sem_post() fails with errno = bad file descriptor in iOS - ios

I am trying the following code:
if (sem_post(sem) == -1)
{
printf("syncr_release error %d\n", errno);
perror("Error:");
return ERROR;
}
and it's giving the following output:
syncr_release error 9
Error:: Bad file descriptor
I cannot find anything about that error code in the documentation about sem_post(). How can I solve this?

Related

vuejs-rails: TypeError: Cannot read properties of undefined (reading '_transitionClasses')

i have 1 button using #click="next"
next() code as below
next() {
if (this.currentSlideID < this.newSpaces.length - 1) {
this.currentSlideID = this.currentSlideID + 1
} else if (this.currentSlideID === this.newSpaces.length - 1) {
this.currentSlideID = 0
}
},
when I click, on the laptop screen, there is no error, but on the mobile screen, the following error is generated:
TypeError: Cannot read properties of undefined (reading '_transitionClasses')
I tried searching but still can't find a way to avoid this error

Appcelerator Facebook Module Error Posting Photo on IOS

I'm using version 5.2.0 of appcelerator's facebook module on the 5.4.0GA sdk. I'm able to post a link to facebook with the following code:
var data = {link: "http://www.stackfish.com" };
fb.requestWithGraphPath('me/feed', data,"POST",showRequestResult);
But when I try to post a photo using the example code I've found I get an array mutation error. Here's the code that causes the error on IOS (it works fine on droid):
if ( fb.getLoggedIn() == true )
{
// Ti.API.info('1.5.5 PostTo FacebookLogged In Perissions = ' + fb.permissions);
Titanium.Media.openPhotoGallery({
success:function(event)
{
var data = {picture: event.media, caption: 'test'};
Titanium.Facebook.requestWithGraphPath('me/photos', data, "POST", showRequestResult);
},
cancel:function()
{
},
error:function(error)
{
},
allowEditing:true
});
Here's the error:
[ERROR] : Script Error {
[ERROR] : column = 2506;
[ERROR] : line = 1;
[ERROR] : message = "*** Collection <__NSDictionaryM: 0x14ee27430> was mutated while being enumerated.";
[ERROR] : sourceURL = "file:///var/containers/Bundle/Application/110C8EFE-A325-4D3C-A15C-AC0FFA89C418/Stackfish.app/alloy/controllers/PostReview.js";
[ERROR] : stack = "[native code]\nsuccess#file:///var/containers/Bundle/Application/110C8EFE-A325-4D3C-A15C-AC0FFA89C418/Stackfish.app/alloy/controllers/PostReview.js:1:2506";
[ERROR] : }
Does anyone have any ideas on what I'm doing wrong? Thanks
Looks valid to me. I created a JIRA-ticket for you here: MOD-2286
We need to remove the fast-iteration to a classic-iteration to avoid mutation issues. Please follow the ticket and give feedback there, thanks!

error while converting from nt to rdf/xml format in Jena

What is the meaning of the following error message:
I am attempting to convert the dogfood.nt to its rdf/xml representation form, what does the StackOverflow message indicate ?
<j.12:Person rdf:about="http://data.semanticweb.org/person/rich-keller">
<j.12:name>Rich Keller</j.12:name>
<rdfs:label>Rich Keller</rdfs:label>
<j.3:affiliation rdf:resource="http://data.semanticweb.org/organization/nasa-ames-research-center"/>
<j.4:holdsRole rdf:resource="http://data.semanticweb.org/conference/iswc/2005/pc-member-at-iswc2005-research-track"/>
</j.12:PersException in thread "main" java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4568)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4568)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
at java.util.regex.Pattern$Curly.match0(Pattern.java:4272)
at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
at java.util.regex.Pattern$Branch.match(Pattern.java:4604)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
at java.util.regex.Pattern$Branch.match(Pattern.java:4604)
at java.util.regex.Pattern$Branch.match(Pattern.java:4602)
Following is the code snippet used:
Model model11 = ModelFactory.createDefaultModel();
InputStream is1 = FileManager.get().open("dogfood4.nt");
if (is1 != null) {
model11.read(is1, null, "N-TRIPLE");
model11.write(os1, "RDF/XML");
} else {
System.err.println("cannot read file ");;
}
I am using the semantic dogfood n-triples.

Push notification missing messages

I am following the tutorial from this website:
https://blog.engineyard.com/2013/developing-ios-push-notifications-nodejs
to deliver push Notification in my app.
I have successfully created the certificate and other files so far. In the server side, I couldn't pass through the Making the Connection step.
I can get my device token in console while running the app. In the tutorial it is said that, after making the connection the Terminal console should give a output as "gateway connected".
But I am not getting this message. The worst case is I am not getting any error message either. I wonder what went wrong. Even though I got some errors in making the connection first like insufficient credentials, mac verify error, I solved those. Now am neither getting any error nor the correct message.
I also add my Terminal console here
SIVAs-MacBook-Air:~ AAA$ cd Desktop/
SIVAs-MacBook-Air:Desktop AAA$ cd poservices/
SIVAs-MacBook-Air:poservices AAA$ node agent/_header.js
SIVAs-MacBook-Air:poservices AAA$ node agent/_header.js
SIVAs-MacBook-Air:poservices AAA$`
var join = require('path').join
, pfx = join(__dirname, '../_certs/pfx.p12');
/*!
* Create a new gateway agent
*/
var apnagent = require('apnagent')
, agent = module.exports = new apnagent.Agent();
/*!
* Configure agent
*/
agent
.set('pfx file', pfx)
.enable('sandbox');
/*!
* Error Mitigation
*/
agent.on('message:error', function (err, msg) {
connect.log('error1');
switch (err.name) {
// This error occurs when Apple reports an issue parsing the message.
case 'GatewayNotificationError':
console.log('[message:error] GatewayNotificationError: %s', err.message);
// The err.code is the number that Apple reports.
// Example: 8 means the token supplied is invalid or not subscribed
// to notifications for your application.
if (err.code === 8) {
console.log(' > %s', msg.device().toString());
// In production you should flag this token as invalid and not
// send any futher messages to it until you confirm validity
}
break;
// This happens when apnagent has a problem encoding the message for transfer
case 'SerializationError':
console.log('[message:error] SerializationError: %s', err.message);
break;
// unlikely, but could occur if trying to send over a dead socket
default:
console.log('[message:error] other error: %s', err.message);
break;
}
});
/*!
* Make the connection
*/
agent.connect(function (err) {
// gracefully handle auth problems
if (err && err.name === 'GatewayAuthorizationError') {
console.log('Authentication Error: %s', err.message);
process.exit(1);
}
// handle any other err (not likely)
else if (err) {
console.log('error1');
throw err;
}
// it worked!
var env = agent.enabled('sandbox')
? 'sandbox'
: 'production';
console.log('apnagent [%s] gateway connected', env);
});
You need to add
agent.set('passphrase', '<YOUR_PASSWORD>');
after
agent.set('pfx file', pfx).enable('sandbox');

FileExists check in WSH script giving object expected error

Why am I getting a runtime error "Object expected" in - If (fs.FileExists(filename)) ?
var filename = "d:\\list.txt";
fs = new ActiveXObject("Scripting.FileSystemObject");
If (fs.FileExists(filename)) //i 'm getting a runtime error "Object expected" here
{
// Open the file
}
Change If to if. JScript is a case-sensitive language.

Resources