Will the following piece of code work as expected in a multi-threaded scenario?
int getUniqueID()
{
static int ID=0;
return ++ID;
}
It's not necessary that the IDs to be contiguous - even if it skips a value, it's fine.
Can it be said that when this function returns, the value returned will be unique across all threads?
Hello there,
I'd like to change the minimum for the id of created objects from 1 to 1000.
So when I create in rails my first model object it gets the ID 1000 and not 1.
Is there a way to set this in the schema/migration files?
I have an app I am offering for free for now. At some point, I want to be able to change it to a pay app.
The market doesn't allow a free app to become for-pay and doesn't allow for-pay apps to be priced at 0$.
So is it possible to just delete the original app and then reupload it as a for-pay app ?
It's okay in my case if users aren't notified of updates.
How do you generate an input's id attribute, given a model? For example, if I have a model of Person with a first_name attribute, the form helper prints out a textbox with this html:
<input type="text" id="person_first_name" />
How can I generate that person_first_name from some other place in the code (like in a controller or some place)?
What is this error?
I am trying to connect from PHP to Traffic Live mysql and do a POST and at some id's I get this error.
With the biggest part of contacts my code works just fine but it keeps getting this trouble maker.
What can I do?
Here is the trouble making code:if ($sales_datemodified[$h] $traffic_datemodified[$t]) {
//if ($traffic_id[$t] != 22033) {
$postrequestclient = $clients - post("staff/employee", null, '{"@class": "com.sohnar.trafficlite.transfer.trafficcompany.TrafficEmployeeTO",
"id": ' . $traffic_id[$t] . ',"locationId":' . $traffic_locationid[$t] . ',
"departmentId": ' . $traffic_departmentid[$t] . ', "ownerCompanyId": ' . $traffic_ownercompanyid[$t] . ',"userId": ' . $traffic_userid[$t] . ',"userName": "' . $traffic_username[$t] . '","employeeDetails": {"id": ' . $traffic_id[$t] . ',"jobTitle": "' . $sales_title[$h] . '","costPerHour": {
"amountString": ' . $traffic_amountString[$t] . ', "currencyType": "' . $traffic_currencyType[$t] . '"},"hoursWorkedPerDayMinutes": ' . $traffic_hwpdm[$t] . ', "personalDetails": {"id": ' . $traffic_persdetId[$t] . ', "firstName": "' . $sales_firstname[$h] . '","middleName": "' . $traffic_middleName[$t] . '","lastName": "' . $sales_lastname[$h] . '",
"emailAddress": "' . $traffic_username[$t] . '","workPhone": "' . $sales_phone[$h] . '","mobilePhone": "' . $sales_mobilephone[$h] . '"
}}}') - setAuth(user, password);
$postresponseclient = $postrequestclient - send() - json();
I don't have any errors in my code. That commented "if" is for excluding the trouble making contact on which I get this error. If I uncomment that the program runs fine without any problems. The problem is that this test is made on a small number of contacts and if I add more contacts to the test I get more errors of this kind. this should be a synchronization job so excluding all the "bad" contacts won't work
Event Log: "Failed to setup initiator portal. Error status is given in the dump data."
This is being recorded every 3/100's of a second. We are using MS iSCSI Initiator on Windows Server 2003, Dell 2970 w/4GB (PAE). I am sure that this was configured by Dell initially. I have no idea what changes or mods were made since the company installed this machine until now.
(I'm a new User so the lovely and vibrant screen images had to be removed. They were quite pretty and I am sure you would have been very moved and appreciative of them.)
It appears that everything is installed correctly and the 5TB bound volume is accessible but I have never worked with iScsi before so I plead total ignorance. In searching I have found this to be a fairly sparce and bland documented subject.
I'd like two things...
First, to get rid of the error msg being logged. MS says it can be ignored if everything is working but it chews up resources logging it and I don't feel comfortable about any errors on my servers. I want to correct whatever is causing this problem.
Secondly, being totally green to this, I would like to confirm that the setup is optimized and we are taking advantage of all features available. Although there are 3 NIC's in this machine it appears that the initiator is only configured for the Broadcom BMC5708C NetXtreme II on our 10.90.1.#, the other 2 NICS are 1GB on the 192.168.0.#. Would additional targets improve performance?
If someone who is experienced in configuring the Microsoft iScsi Initiator can help I would really appreciate it since, as I mentioned, everything I have come across has not been of any value at all.
Thanks!
~AZ
Hello Experts,
We have an enterprise web app to which our clients post/upload lots of documents [mainly images and pdf files] via web interface, iphone app etc etc. We are also using imagick to split pdf documents into images.
Also, large number of mysql SELECT/UPDATE/DELETE queries happen all day.
Currently, all of this is happening on same server and we are planning to split the process in 3 stages :
1) a server only for database
2) a server only for documents (document upload, splitting etc)
3) a server for the main php web app
Is there any drawback with this kind of structure as compared to hosting everything on same server ?
Please guide.
Thanks,
Amit
All,
Is it possible to add a website to gmail messenger list.what ever the purpose may be....
I have seen someone doing this today. If so please guide me to the possible link
Thanks
now this is really annoying - I'm having a global problem in Windows 7:
when using the system's "save as"-file dialog, the main app will just hang.
the mouse-cursor is showing progress, the whole app is hanging and I need to terminate it manually. it's happening with every app! (notepad, word, graphics app).
I'm assuming it's something with the system enumerating the harddisk-drivenames or something.
any idea how to fix this?
by the way - when viewing the problem details - it's telling the module - it's msonsext.dll,
looks like some office thing to me.
I have two mac mini lion servers setup to run as production and staging machines. My sysadmin decided on these machines over the previous CentOS we had because it had an "interface" to be able to manage it, rather than just the terminal. To be honest, I prefer the terminal.
My problem is, the mac osx 10.7 server.app seems to be having issues with the creation of virtual hosts in the 'Web' section. It seems VERY touchy. For example, I cannot create a http virtual host first. I have to create a https host first with a unique dns name 9e..g vuly6), then create the http host with a different dns name to the first (e.g. www), or it appears to override it the first one, even though one is ssl and one is non-ssl.
Further, it seems to override perfectly good configurations at random. For example, the default sites directory is usually /Users/default/Sites/Customsites or something, but sometimes when I load the server.app it changes to /var/empty. Also, if I change or add extra virtual hosts after the first one or two, it starts to mess up and the first two virtual hosts start having issues.
Has anyone had any experience with setting up virtual hosts via this app? Am I able to manually create these virtual hosts, without using the app, and without the app overriding my settings when I restart apache?
I want to read the physical address of the NIC model, i can get the results that i want to with SED.EXE before, but SED.EXE does not support my environment but Python ok, who have the means to do it.
The general situation (not plug the network cable, it is impossible to obtain IP address):
Ethernet adapter:
Connection-specific DNS Suffix.: Chianet
Description ...........: Marvell Yukon 88E8040 PCI-E Fast Ethernet Controller
Physical Address .........: A4-BA-DB-9D-1E-8E
Dhcp Enabled ...........: Yes
Autoconfiguration Enabled ....: Yes
Ethernet adapter 3:
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Dell Wireless 1510 Wireless-N WLAN Mini-Card
Physical Address. . . . . . . . . : 00-23-4D-D9-C0-28
The description of the NIC different, we can use this to fetch the corresponding physical address, base on Physical Address does not work, because the computer with the WLAN Card, I want to use Python to read my computer the card information and after Python handles an output file, output file format: SET MAC = A4BADB9D1E8E
and sed format:
ipconfig -all|sed -nrf getmac.sed | sed -e "s/-//g" > WINMAC.BAT
getmac.sed:
/Marvell Yukon 88E8040/ {
n;
s/.*: ([-0-9A-F]+)/set winmac=\1/p;
}
I need to copy a website, but I want to exclude specific HTML element IDs and classes in all pages (using a bash script).
I need this because I don't want ads or some other annoying features of some websites.
I just upgraded my machine with Windows 7 Pro x64, to Windows 8 Pro x64, with the Windows 8 Upgrade Assistant.
Everything went great, but none of the Modern UI Apps open, and they do not show any error messages or warnings, they just close right away I opened them.
I tried to open Skydrive, Windows Store, Photo App,Music App, Bing, Videos , Finances and all the available Modern UI apps on my screen
My screen resolution is 1080p, so it is not a resolution issue, I'm using a Windows account , but i switched to Local account but didn't solved the issue. I ran Windows Update and updated my nVidia video drivers.
I also tried an app called "Metro App Troubleshooter" without luck
I'm administering a number of Macs, whose users would like to be able to make use of iCal.app (and hence iPhone sync) to view and edit Oracle Calendar events.
Is there a good way to bidirectionally interface Oracle Calendar's SyncML with iCal.app?
Or alternatively is there a way to bridge a SyncML server to provide CalDAV service (which iCal.app can natively handle)?
I already have a Mountain Lion Installer app, downloaded from Apple Store.
Now, I would like to install ML on another machine I own. I didn't want to download it again, so I copied the .app to the other machine and try to run.
Unfortunately due to some error about mac unable to run the .app I wasn't able to install.
Most tutorial suggest to make a bootable USB starting by the installer InstallESD.dmg, found in installer .app. I would like instead to run the .dmg directly.
So I have three 'propedeutic' questions:
can I just mount and run the .dmg without making a bootable drive ?
I do have backup, a TimeCapsule one to be precise. In case of failure, can I just use the previous backup, and restore to Lion 10.7 ?
from 'Apple Store point of view', would my machine be recognized as upgraded and elegible for future update ?
When I open an iCal invitation (Mail Attachment.ics file) in Mac Mail.app sent to me from someone using Thunderbird, I receive the following error:
The only solution that I've found to date is to save the Mail Attachment.ics file somewhere like the Desktop, open it in a text editor, and delete the blank lines at the beginning and end of the file. This problem appears to only happen when I'm receiving invitations from people using Thunderbird under Windows.
Does anyone know of a better way to solve this problem?
Is this a bug in Apple iCal, or is Thunderbird not meeting the iCal spec?
Configuration Information
OS: Mac OS X 10.6.2
Mail Program: Mac Mail.app ver. 4.2 (1077)
Calendar Program: Mac iCal.app ver 4.0.1 (1374)
Try visiting:
http://youtube.com/watch?v=1
http://youtube.com/watch?v=19so8b
http://youtube.com/watch?v=anyinvalidid
tried in chrome and firefox.
Is this a bug in Youtube or the way browsers are constructed?
what is the reason for the continuous reloads of the page?
I have a CodeIgniter app that I deployed to a server with php 5.2 and my dev box has 5.3, and some stuff doesn't work anymore. I didn't want to upgrade php and risk the other app on the server having issues. Anyway I compiled a custom PHP and added the following to a single .conf file in /etc/httpd/conf.d/zcid.conf with all the other conf files.
<VirtualHost *:80>
DocumentRoot /var/www/cid/app
ServerName sub.example.co.nz
</VirtualHost>
<Directory "/var/www/cid/app">
authtype Basic
authname "oh dear how did this get here i am no good with computer"
authuserfile /path/to/auth
require valid-user
RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt|createEvent\.php|/cgi-bin)
RewriteRule ^(.*)$ /index.php/$1 [L]
AddHandler custom-php .php
Action custom-php /cgi-bin/php53.cgi
</Directory>
In /var/www/cid/app I have the cgi-bin folder and the php53.cgi that I copied from /usr/local/php53/bin/php-cgi
But now when I navigate to the subdomain it says:
The requested URL /cgi-bin/php53.cgi/index.php/ was not found on this server.
And if I try to browse to /cgi-bin it says (what it is supposed to?):
You don't have permission to access /cgi-bin/ on this server.
Quite confused now. Anyone know what to do here?
Thanks :)
I have connected my Windows live account(Microsoft account), Facebook account and Google account with Windows 8.
On "People" Windows 8 app it shows as connected to Microsoft, Facebook, Google, whereas in "Messaging" app its connected only to Microsoft and Facebook.
While I can chat with Facebook online contacts and messenger's, I cant find my Google online contacts only on Messaging app.
Seems like Google supports only sharing of contacts and not chat as of now. Does anyone knows how to get Google chat on Windows 8 Messaging?
In windows server 2003 when an Event 529 (logon failure) occures with a logon type of 10 (remote logon), the source network IP address is recorded in the event log.
On a windows XP machine, this (and some other details) are omitted.
If a bot is trying a brute force over RDP (some of my XP machines are (and need to be) exposed with a public IP address), i cannot see the originating IP address so i don't know what to block (with a script i run every few minutes).
The DC does not log this detail either when the logon attempt is to the client xp machine and the DC is only asked to authenticate the credentials.
Any help getting this detail in the log would be appreciated.
I'm on a Mac Mini with OS X 10.8.2. I am an app developer, but in this case am building an app in C++, so I can not use Xcode for this question. I would like to track how much memory my app is using, but I don't want to manually record it. How do I do this.
MORE INFO: I want to record it all day long. I will have the app running all day, so that I can compare peaks in memory. I am not opposed to 3rd party apps, as long as they are reliable. Thanks.
I have a CodeIgniter app that I deployed to a server with php 5.2 and my dev box has 5.3, and some stuff doesn't work anymore. I didn't want to upgrade php and risk the other app on the server having issues. Anyway I compiled a custom PHP and added the following to a single .conf file in /etc/httpd/conf.d/zcid.conf with all the other conf files.
<VirtualHost *:80>
DocumentRoot /var/www/cid/app
ServerName sub.example.co.nz
</VirtualHost>
<Directory "/var/www/cid/app">
authtype Basic
authname "oh dear how did this get here i am no good with computer"
authuserfile /path/to/auth
require valid-user
RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt|createEvent\.php|/cgi-bin)
RewriteRule ^(.*)$ /index.php/$1 [L]
AddHandler custom-php .php
Action custom-php /cgi-bin/php53.cgi
</Directory>
In /var/www/cid/app I have the cgi-bin folder and the php53.cgi that I copied from /usr/local/php53/bin/php-cgi
But now when I navigate to the subdomain it says:
The requested URL /cgi-bin/php53.cgi/index.php/ was not found on this server.
And if I try to browse to /cgi-bin it says (what it is supposed to?):
You don't have permission to access /cgi-bin/ on this server.
Quite confused now. Anyone know what to do here?
Thanks :)
Getting the following error on my SBS 2003 R2 Server:
Server ActiveSync:
Unexpected Exchange mailbox Server error: Server: [celeritympp.mpp1.local] User: [[email protected]] HTTP status code: [409]. Verify that the Exchange mailbox Server is working correctly.
Any help would be greatly appreciated.