PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
3,176,984
07/05/2010 02:32:52
433,417
06/07/2010 07:35:50
157
0
I want to make this program remember settings...
I have tried unsuccessfully several times to get programs to remember settings after they've been destroyed. A large reason for that is because I don't have an example code to work off of. Below I have a simple program I wrote. I'd like it so that it both remembers the position of the scale, and the contents of the text widget upon restarting the program. I hate having to ask someone to write code for me, but I'm honestly stuck. I'm using Python 2.6.5 on Windows 7, BTW. Code: import Tkinter class simpleapp_tk(Tkinter.Tk): def __init__(self,parent): Tkinter.Tk.__init__(self,parent) self.parent = parent self.initialize() def initialize(self): self.sclX = Tkinter.Scale(self, from_=0, to=100, orient='horizontal',resolution=1,command=self.A) self.sclX.pack(ipadx=75) self.labelVar = Tkinter.StringVar() self.label = Tkinter.Label(self,textvariable=self.labelVar) self.label.pack(ipadx=75) self.frame = Tkinter.Frame(self,relief='ridge',borderwidth=4) self.frame.pack() self.LVariable = Tkinter.StringVar() self.s = Tkinter.Scrollbar(self.frame) self.L = Tkinter.Text(self.frame,borderwidth=0,font=('Arial', 10),width=30, height=15) self.s.config(command=self.L.yview,elementborderwidth=1) self.L.grid(column=0,row=0,sticky='EW') self.s.grid(column=1,row=0,sticky='NSEW') def A(self, event): self.labelVar.set(100 - self.sclX.get()) if __name__ == "__main__": app = simpleapp_tk(None) app.mainloop()
python
memory
tkinter
null
null
null
open
I want to make this program remember settings... === I have tried unsuccessfully several times to get programs to remember settings after they've been destroyed. A large reason for that is because I don't have an example code to work off of. Below I have a simple program I wrote. I'd like it so that it both remembers the position of the scale, and the contents of the text widget upon restarting the program. I hate having to ask someone to write code for me, but I'm honestly stuck. I'm using Python 2.6.5 on Windows 7, BTW. Code: import Tkinter class simpleapp_tk(Tkinter.Tk): def __init__(self,parent): Tkinter.Tk.__init__(self,parent) self.parent = parent self.initialize() def initialize(self): self.sclX = Tkinter.Scale(self, from_=0, to=100, orient='horizontal',resolution=1,command=self.A) self.sclX.pack(ipadx=75) self.labelVar = Tkinter.StringVar() self.label = Tkinter.Label(self,textvariable=self.labelVar) self.label.pack(ipadx=75) self.frame = Tkinter.Frame(self,relief='ridge',borderwidth=4) self.frame.pack() self.LVariable = Tkinter.StringVar() self.s = Tkinter.Scrollbar(self.frame) self.L = Tkinter.Text(self.frame,borderwidth=0,font=('Arial', 10),width=30, height=15) self.s.config(command=self.L.yview,elementborderwidth=1) self.L.grid(column=0,row=0,sticky='EW') self.s.grid(column=1,row=0,sticky='NSEW') def A(self, event): self.labelVar.set(100 - self.sclX.get()) if __name__ == "__main__": app = simpleapp_tk(None) app.mainloop()
0
8,594,890
12/21/2011 18:57:03
647,210
03/06/2011 18:59:05
38
0
Getting the size of or automatically scaling content through WebKitGtk
I have an application that's rendering HTML5 format animations in a WebKit Gtk window. (The application is being developed in Vala, for what it's worth). I can play back an animation file fine, but it's rendering at 1:1 scale, and I want it to fill the window. There is a scale function on the WebView, but I'd need to be able to find the size of the content and do the math to determine scale factor. Does anyone have a suggestion?
webkit
gtk
vala
null
null
null
open
Getting the size of or automatically scaling content through WebKitGtk === I have an application that's rendering HTML5 format animations in a WebKit Gtk window. (The application is being developed in Vala, for what it's worth). I can play back an animation file fine, but it's rendering at 1:1 scale, and I want it to fill the window. There is a scale function on the WebView, but I'd need to be able to find the size of the content and do the math to determine scale factor. Does anyone have a suggestion?
0
3,512,959
08/18/2010 14:09:22
424,094
08/18/2010 14:09:22
1
0
How to read XML attribute from a TABLE?
The database have Table EMP with 3 columns empID , badgID , XMLDATA. The XMLDATA have datatype "clob" and data is in the form - <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Record id="11"> <Demo rID="5"/> </Record>. How can i read the attribute "rID" in node "Demo"value in the above XMLDATA in single query? Server - SQL SERVER 2005
sql-server-2005
null
null
null
null
null
open
How to read XML attribute from a TABLE? === The database have Table EMP with 3 columns empID , badgID , XMLDATA. The XMLDATA have datatype "clob" and data is in the form - <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Record id="11"> <Demo rID="5"/> </Record>. How can i read the attribute "rID" in node "Demo"value in the above XMLDATA in single query? Server - SQL SERVER 2005
0
9,068,003
01/30/2012 17:25:17
1,046,465
11/14/2011 22:13:22
8
0
What is wrong with this C# mysql INSERT statement?
I KEEP GETTING the same vague error with this code command.CommandText = "INSERT INTO database (upc, title, description, quantity) VALUES ('"+ upc.Text +"',"+"'"+titlename+"',"+ "'"+descname+"',"+ "'1'"+"), MyConString"; the error is {"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database (upc, title, description, quantity) VALUES ('016000165779','Betty Crock' at line 1"} I'm a newb at C# and trying to build a program that uses UPC codes that get inserted into a mysql database.
c#
mysql
insert
upc
null
null
open
What is wrong with this C# mysql INSERT statement? === I KEEP GETTING the same vague error with this code command.CommandText = "INSERT INTO database (upc, title, description, quantity) VALUES ('"+ upc.Text +"',"+"'"+titlename+"',"+ "'"+descname+"',"+ "'1'"+"), MyConString"; the error is {"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database (upc, title, description, quantity) VALUES ('016000165779','Betty Crock' at line 1"} I'm a newb at C# and trying to build a program that uses UPC codes that get inserted into a mysql database.
0
1,229,869
08/04/2009 20:52:07
32,484
10/29/2008 17:48:46
2,070
107
Good books covering hardware for programmers
I am a .NET developer for a company providing managed services. This means we provide hosting, connectivity, security services, bandwidth and monitoring. As a result, the hardware stuff is not abstracted away from my daily duties. I still have to know what load balancers are, switches, firewalls, etc. I know most - not all - of this. Even though it is not programming, if any hardware/system is effecting the uptime/availability of a system I program against, then this is partly my problem. Hence I need to know about hardware. What books are there which explain the following for programmers (so not inside out but to a reasonable depth): -Hardware involved in hosting (I have scalable internet architectures which does this, any others? That book is small and so not as in depth as possible). -Hardware in PCs - memory, CPUs and how they work in depth. Pragmatic Bookshelf have a book called Inside Computer Electronics and OReilly have Inside The Machine. I am not sure how relevent these books are. Windows Internals Fifth Edition seems very relevant though I don't know if it was intended for programmers at all (will find out). Any good recommendations? I am sure there are previous threads on this but I can't find them (not even in the related questions which have just popped up).
books
hardware
null
null
null
10/02/2011 00:34:52
not constructive
Good books covering hardware for programmers === I am a .NET developer for a company providing managed services. This means we provide hosting, connectivity, security services, bandwidth and monitoring. As a result, the hardware stuff is not abstracted away from my daily duties. I still have to know what load balancers are, switches, firewalls, etc. I know most - not all - of this. Even though it is not programming, if any hardware/system is effecting the uptime/availability of a system I program against, then this is partly my problem. Hence I need to know about hardware. What books are there which explain the following for programmers (so not inside out but to a reasonable depth): -Hardware involved in hosting (I have scalable internet architectures which does this, any others? That book is small and so not as in depth as possible). -Hardware in PCs - memory, CPUs and how they work in depth. Pragmatic Bookshelf have a book called Inside Computer Electronics and OReilly have Inside The Machine. I am not sure how relevent these books are. Windows Internals Fifth Edition seems very relevant though I don't know if it was intended for programmers at all (will find out). Any good recommendations? I am sure there are previous threads on this but I can't find them (not even in the related questions which have just popped up).
4
679,495
03/24/2009 22:25:14
14,392
09/16/2008 23:41:26
483
16
Disable Advertised File Associations in VS Setup (Installer) project
I'm using a Setup project in VS 2005, and I've learned all about the "joys" of advertised shortcuts. My project creates shortcuts to the program on the Desktop and Start Menu, and whenever those are run, the MSI re-installs the application (because installed files have changed). I've also created a file association for my application, which does the same thing. I've figured out how to set up a vbscript that I can run post-build to disable advertised shortcuts (using DISABLEADVTSHORTCUTS=1), however, I am at a loss trying to figure out how to achieve the same functionality with file associations!
c#
visual-studio
installer
msi
null
null
open
Disable Advertised File Associations in VS Setup (Installer) project === I'm using a Setup project in VS 2005, and I've learned all about the "joys" of advertised shortcuts. My project creates shortcuts to the program on the Desktop and Start Menu, and whenever those are run, the MSI re-installs the application (because installed files have changed). I've also created a file association for my application, which does the same thing. I've figured out how to set up a vbscript that I can run post-build to disable advertised shortcuts (using DISABLEADVTSHORTCUTS=1), however, I am at a loss trying to figure out how to achieve the same functionality with file associations!
0
8,735,724
01/04/2012 23:42:16
1,130,862
01/04/2012 21:34:55
1
0
find all words in a string against large text
Using Regular Expressions, I have to find all words in a string against a large text. For example, a sentence I understand that '|' (pipe) can be used to find if one or more of the words are in the string. But i need to check for "AND" condition instead of "OR" which means i need to check if all the words exists in the specified string. Is this possible using a single Regular Expression pattern and a single call? I am using C# 3.5 Please give a solution.
c#
regex
null
null
null
01/06/2012 02:56:07
not a real question
find all words in a string against large text === Using Regular Expressions, I have to find all words in a string against a large text. For example, a sentence I understand that '|' (pipe) can be used to find if one or more of the words are in the string. But i need to check for "AND" condition instead of "OR" which means i need to check if all the words exists in the specified string. Is this possible using a single Regular Expression pattern and a single call? I am using C# 3.5 Please give a solution.
1
1,708,867
11/10/2009 15:38:55
192,702
10/19/2009 21:27:43
27
0
check type of element in stl container - c++
how can i get the type of the elements that are held by a STL container?
c++
stl
containers
types
null
null
open
check type of element in stl container - c++ === how can i get the type of the elements that are held by a STL container?
0
10,512,095
05/09/2012 08:01:40
1,266,251
03/13/2012 10:41:43
10
3
Drupal Commerce: Alter 'Checkout' link in user menu
How do you hook into the 'checkout' link in the user menu? If there is an item in the basket, want to be able to add a class to the 'checkout' link. Ideally from the theme template and not hacking the core.
drupal-7
null
null
null
null
05/09/2012 11:54:06
off topic
Drupal Commerce: Alter 'Checkout' link in user menu === How do you hook into the 'checkout' link in the user menu? If there is an item in the basket, want to be able to add a class to the 'checkout' link. Ideally from the theme template and not hacking the core.
2
8,392,238
12/05/2011 21:38:17
969,528
09/28/2011 16:34:28
210
1
Web app: completely JS based or PHP +Js
I'm going to build my first web app and I have two choice: 1-)build an app based completely in js using ajax to make calls to databases/validation client side 2-)build an app where pages are generated using PHP and then use JS for effects and some ajax - With the first solution I've one main problem: I need to retrieve all content form databases after the page is created using a lot of new DOM elements and maybe slowing down the browser - While with the second solution I may have problems to use HTML5 caching which would be very important since i want to make the app usable also offline Which one do you think is better and how would you structure the app?
php
javascript
database
web-applications
null
12/06/2011 04:29:47
not constructive
Web app: completely JS based or PHP +Js === I'm going to build my first web app and I have two choice: 1-)build an app based completely in js using ajax to make calls to databases/validation client side 2-)build an app where pages are generated using PHP and then use JS for effects and some ajax - With the first solution I've one main problem: I need to retrieve all content form databases after the page is created using a lot of new DOM elements and maybe slowing down the browser - While with the second solution I may have problems to use HTML5 caching which would be very important since i want to make the app usable also offline Which one do you think is better and how would you structure the app?
4
8,798,393
01/10/2012 04:02:06
1,044,137
11/13/2011 12:09:20
88
0
A.out When It is Made?
I am new to unix so I just could not understand that a.out is made after linking or loading ?
c
unix
operating-system
null
null
01/10/2012 04:11:17
not a real question
A.out When It is Made? === I am new to unix so I just could not understand that a.out is made after linking or loading ?
1
6,159,458
05/28/2011 03:23:53
561,395
01/03/2011 15:06:36
460
2
Taking a screenshot in-app then putting it in a UIImageView does so at normal resolution
After zooming the iOS simulator up to 100%, i've noticed that my icons which are made by the app through taking a 'screenshot' of a view using this code are in normal resolution, whereas everything else appears to be in retina resolution: UIGraphicsBeginImageContext(rect.size); [object.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *screenShot = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); Any ideas how to make it be in retina resolution?
iphone
objective-c
retinadisplay
null
null
null
open
Taking a screenshot in-app then putting it in a UIImageView does so at normal resolution === After zooming the iOS simulator up to 100%, i've noticed that my icons which are made by the app through taking a 'screenshot' of a view using this code are in normal resolution, whereas everything else appears to be in retina resolution: UIGraphicsBeginImageContext(rect.size); [object.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *screenShot = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); Any ideas how to make it be in retina resolution?
0
5,546,963
04/05/2011 03:48:15
170,365
09/08/2009 18:48:04
1,494
10
How can I print the string value and not the hex in GDB debugger?
?????(gdb) run hello The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /Users/doug/langs/c/test hello Breakpoint 1, main (argc=2, argv=0xbffffa7c) at hw3b.c:14 14 if (argc != 2) { (gdb) printf "%s", argv ??????(gdb) I searched other questions on SO and I tried all the commands that I found but I keep getting ??? marks. Why is that?
gdb
debugging
null
null
null
null
open
How can I print the string value and not the hex in GDB debugger? === ?????(gdb) run hello The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /Users/doug/langs/c/test hello Breakpoint 1, main (argc=2, argv=0xbffffa7c) at hw3b.c:14 14 if (argc != 2) { (gdb) printf "%s", argv ??????(gdb) I searched other questions on SO and I tried all the commands that I found but I keep getting ??? marks. Why is that?
0
10,574,625
05/13/2012 19:39:47
1,379,670
05/07/2012 11:53:50
1
0
which application is better for secure
I'm planning to design an online exam application which has sensitive data which cannot be simply copied by screen shot or copy paste, is there a way to get around this in web application or silver light ?? or can it be handled in c# wpf application using web services ? Please let me know available alternatives ..
c#
asp.net
printing
web
screenshot
05/14/2012 15:00:41
not constructive
which application is better for secure === I'm planning to design an online exam application which has sensitive data which cannot be simply copied by screen shot or copy paste, is there a way to get around this in web application or silver light ?? or can it be handled in c# wpf application using web services ? Please let me know available alternatives ..
4
5,610,526
04/10/2011 08:10:47
700,674
04/10/2011 08:10:47
1
0
Php to ASP Conversion
Can someone help me converting following Php function in to classic ASP/VBScript function/routine? <?php function ipnVerification() { $secretKey="YOUR SECRET KEY"; $pop = ""; $ipnFields = array(); foreach ($_POST as $key => $value) { if ($key == "cverify") { continue; } $ipnFields[] = $key; } sort($ipnFields); foreach ($ipnFields as $field) { // if Magic Quotes are enabled $_POST[$field] will need to be // un-escaped before being appended to $pop $pop = $pop . $_POST[$field] . "|"; } $pop = $pop . $secretKey; $calcedVerify = sha1(mb_convert_encoding($pop, "UTF-8")); $calcedVerify = strtoupper(substr($calcedVerify,0,8)); return $calcedVerify == $_POST["cverify"]; } ?> I am very early at ASP Classic. Any help will be much appreciated. Thanks, Ahmad.
php5
function
asp
null
null
04/10/2011 18:44:13
too localized
Php to ASP Conversion === Can someone help me converting following Php function in to classic ASP/VBScript function/routine? <?php function ipnVerification() { $secretKey="YOUR SECRET KEY"; $pop = ""; $ipnFields = array(); foreach ($_POST as $key => $value) { if ($key == "cverify") { continue; } $ipnFields[] = $key; } sort($ipnFields); foreach ($ipnFields as $field) { // if Magic Quotes are enabled $_POST[$field] will need to be // un-escaped before being appended to $pop $pop = $pop . $_POST[$field] . "|"; } $pop = $pop . $secretKey; $calcedVerify = sha1(mb_convert_encoding($pop, "UTF-8")); $calcedVerify = strtoupper(substr($calcedVerify,0,8)); return $calcedVerify == $_POST["cverify"]; } ?> I am very early at ASP Classic. Any help will be much appreciated. Thanks, Ahmad.
3
8,914,076
01/18/2012 16:56:23
86,030
04/02/2009 06:10:27
287
13
Wrap content in a Div with javascript without iframe refreshing
Basically I want to wrap some content on my page in a div. I can do this using the wrap function in jQuery but my issue is that I have a few iframes in my content which contain advertising and when you wrap the content it refreshes the iframes. From what I can tell this is because behind the scenes it is cloning the content to be wrapped into the new div. html <div class="content"> <iframe src="http://something.com/ads"></iframe> </div> js `$(content).wrap('awesome_container');` Ideally I would like to just slot in some open div tags before the content div and a few close div tags afterwards but I can't seem to add any divs to the page without it adding close tags. Does anyone know of a way around this issue? Cheers
javascript
jquery
html
null
null
null
open
Wrap content in a Div with javascript without iframe refreshing === Basically I want to wrap some content on my page in a div. I can do this using the wrap function in jQuery but my issue is that I have a few iframes in my content which contain advertising and when you wrap the content it refreshes the iframes. From what I can tell this is because behind the scenes it is cloning the content to be wrapped into the new div. html <div class="content"> <iframe src="http://something.com/ads"></iframe> </div> js `$(content).wrap('awesome_container');` Ideally I would like to just slot in some open div tags before the content div and a few close div tags afterwards but I can't seem to add any divs to the page without it adding close tags. Does anyone know of a way around this issue? Cheers
0
11,232,830
06/27/2012 18:34:49
1,440,354
06/06/2012 17:01:40
54
3
Android: Register C2DM receivers programmatically?
Is it possible? If anyone thinks so please just answer yes and I will update with code. So far i've been unsuccessful in registering the receivers programmatically rather than in the static manifest. There's a few reasons I chose this structure. I'll ellaborate if anyone would like me to.
android
android-c2dm
null
null
null
06/27/2012 18:35:43
not a real question
Android: Register C2DM receivers programmatically? === Is it possible? If anyone thinks so please just answer yes and I will update with code. So far i've been unsuccessful in registering the receivers programmatically rather than in the static manifest. There's a few reasons I chose this structure. I'll ellaborate if anyone would like me to.
1
5,861,187
05/02/2011 18:56:04
675,097
03/24/2011 14:42:54
12
0
Stable Configuration for DNN 5.6
What is the recommended configuration for installing DNN 5.6 like the web server, sql server etc.,
dnn
null
null
null
null
05/03/2011 09:22:05
not a real question
Stable Configuration for DNN 5.6 === What is the recommended configuration for installing DNN 5.6 like the web server, sql server etc.,
1
11,571,865
07/20/2012 02:02:37
1,155,683
01/18/2012 07:55:47
85
0
HOw can i knows the "providers" column in symfony2 custom user provider
I am not able to find what are the other options for providers in symfony secirity e,g This link http://symfony.com/doc/current/cookbook/security/custom_provider.html says that security: providers: webservice: id: webservice_user_provider Now i know that id is the service id of the class which implements user providerinterface But what is `webservice` here , how can i get it and laso what is the diff between this code and code above providers: administrators: entity: { class: AcmeUserBundle:User} I am confused whether i need to use User as Entity there or UserManager which implements userproviderinterface there
php
symfony-2.0
user
null
null
null
open
HOw can i knows the "providers" column in symfony2 custom user provider === I am not able to find what are the other options for providers in symfony secirity e,g This link http://symfony.com/doc/current/cookbook/security/custom_provider.html says that security: providers: webservice: id: webservice_user_provider Now i know that id is the service id of the class which implements user providerinterface But what is `webservice` here , how can i get it and laso what is the diff between this code and code above providers: administrators: entity: { class: AcmeUserBundle:User} I am confused whether i need to use User as Entity there or UserManager which implements userproviderinterface there
0
2,872,826
05/20/2010 10:22:18
330,644
05/02/2010 02:13:24
1,402
166
Smart URI handling for a CMS engine?
I am writing a CMS engine that improves upon the blog engine on my website. So far, the existing blog only has one smart URI handler - one that converts `/123` into `/blog.php?p=123` and that's currently done by a few `mod_rewrite` statments. I am afraid that this method is unwieldy and kludgy for when I have more "smart URIs" in my CMS. At the moment, I've thought about a way that could do this in PHP, but it also seems semantically "evil". I'd get the `ErrorDocument 404` to use a PHP script that parses URIs and includes proper scripts dynamically (changing the statuscode to `200` on the way). Should I do that? Are there better ways? I'm aiming for a neat smart URI parsing just like on Launchpad.net.
php
uri
rewrite
null
null
null
open
Smart URI handling for a CMS engine? === I am writing a CMS engine that improves upon the blog engine on my website. So far, the existing blog only has one smart URI handler - one that converts `/123` into `/blog.php?p=123` and that's currently done by a few `mod_rewrite` statments. I am afraid that this method is unwieldy and kludgy for when I have more "smart URIs" in my CMS. At the moment, I've thought about a way that could do this in PHP, but it also seems semantically "evil". I'd get the `ErrorDocument 404` to use a PHP script that parses URIs and includes proper scripts dynamically (changing the statuscode to `200` on the way). Should I do that? Are there better ways? I'm aiming for a neat smart URI parsing just like on Launchpad.net.
0
3,825,554
09/29/2010 20:24:59
313,821
04/11/2010 08:52:42
34
1
In gnome-terminal/bash, can std output be run directly (interpreted?) as a command ?
I've just come off the Winows wagon, and the gnome-terminal and bash are looking great, but I don't quite know how to get it to do what I want, (I suspect it is possible). Can std output (eg. from sed) be made to run as a command? (ie. interpret and run the output as part of the script's logic.) I am polling a process to output its status at timed intervals, and I would like to do it as a one liner. # dd is already running in another terminal. Its PID is 1234 pgrep -l '^dd$' | sed -n 's/^\([0-9]\+.*\)/sudo watch -n 30 kill -USR1 \1/p' # this outputs: sudo watch 30 kill -USR1 1234 Is the some short-cut terminal/bash magic to run `sudo watch 30 kill -USR1 1234`? Thanks.
ubuntu
sed
command
gnome-terminal
null
null
open
In gnome-terminal/bash, can std output be run directly (interpreted?) as a command ? === I've just come off the Winows wagon, and the gnome-terminal and bash are looking great, but I don't quite know how to get it to do what I want, (I suspect it is possible). Can std output (eg. from sed) be made to run as a command? (ie. interpret and run the output as part of the script's logic.) I am polling a process to output its status at timed intervals, and I would like to do it as a one liner. # dd is already running in another terminal. Its PID is 1234 pgrep -l '^dd$' | sed -n 's/^\([0-9]\+.*\)/sudo watch -n 30 kill -USR1 \1/p' # this outputs: sudo watch 30 kill -USR1 1234 Is the some short-cut terminal/bash magic to run `sudo watch 30 kill -USR1 1234`? Thanks.
0
9,485,896
02/28/2012 16:36:19
978,528
10/04/2011 13:28:28
30
0
Calling C++ dll from Java
I'm using Java for a small app. It's a rewrite of an existing MFC project. There is an existing dll that I need to change to enable access from Java using JNI. All of this Java stuff is new to me, so I'm having a little trouble and feeling rather dense when I read other forum posts. In the existing dll I have a function like this: extern "C" __declspec(dllexport) bool Create() { return TRUE; } Dumb question time. How do I properly set it up to be called by Java? I tried this: JNIEXPORT jboolean JNICALL Create() { return TRUE; } I'm including jni.h and everything compiles fine. However, when I call it from Java I get UnsatisfiedLinkError. I'm calling it from Java using this: public static native boolean CreateSession(); System.load("D:\\JavaCallTest.dll"); Create(); Could someone kindly push me in the proper direction? I sincerely appreciate any help. Thanks, Nick
java
dll
jni
null
null
null
open
Calling C++ dll from Java === I'm using Java for a small app. It's a rewrite of an existing MFC project. There is an existing dll that I need to change to enable access from Java using JNI. All of this Java stuff is new to me, so I'm having a little trouble and feeling rather dense when I read other forum posts. In the existing dll I have a function like this: extern "C" __declspec(dllexport) bool Create() { return TRUE; } Dumb question time. How do I properly set it up to be called by Java? I tried this: JNIEXPORT jboolean JNICALL Create() { return TRUE; } I'm including jni.h and everything compiles fine. However, when I call it from Java I get UnsatisfiedLinkError. I'm calling it from Java using this: public static native boolean CreateSession(); System.load("D:\\JavaCallTest.dll"); Create(); Could someone kindly push me in the proper direction? I sincerely appreciate any help. Thanks, Nick
0
8,487,600
12/13/2011 10:27:45
558,491
12/30/2010 16:41:02
4
0
jomsocial vs elgg vs socialengine vs phpfox vs boonex dating matrimony website
I was trying to build a dating/matrimonial website using the commercially available social networking platforms. I need help to decide on which one to use based upon following criteria. 1. Customization in terms of dating/matrimonial website 2. Payment gateway integration 3. Third party games and gift shops 4. Profile completion in % same as linkedIn, different level of user profile, Administrator approval of profiles , Able to send sms to users , private messages to other user based upon different tier of membership (paid/free/gold etc) 5. Advanced search criteria based upon geo location/proximity based upon ip address, best match/suggest based upon user profile, video/chat 6. discount codes, eCommerce shops and many more, Kindly help me in deciding which platform, I should be using which can be customized according to the above mentioned requirements or else suggest some good dating software provider. I am not looking for white label software houses, where I end up sharing the revenue, which I dont want to. thanks
social-networking
joomla1.7
elgg
socialengine
null
12/13/2011 23:52:33
not constructive
jomsocial vs elgg vs socialengine vs phpfox vs boonex dating matrimony website === I was trying to build a dating/matrimonial website using the commercially available social networking platforms. I need help to decide on which one to use based upon following criteria. 1. Customization in terms of dating/matrimonial website 2. Payment gateway integration 3. Third party games and gift shops 4. Profile completion in % same as linkedIn, different level of user profile, Administrator approval of profiles , Able to send sms to users , private messages to other user based upon different tier of membership (paid/free/gold etc) 5. Advanced search criteria based upon geo location/proximity based upon ip address, best match/suggest based upon user profile, video/chat 6. discount codes, eCommerce shops and many more, Kindly help me in deciding which platform, I should be using which can be customized according to the above mentioned requirements or else suggest some good dating software provider. I am not looking for white label software houses, where I end up sharing the revenue, which I dont want to. thanks
4
37,882
09/01/2008 12:37:30
3,394
08/28/2008 12:35:39
893
49
How can you easily reorder columns in LINQ to SQL designer?
When designing LINQ classes using the LINQ to SQL designer I've sometimes needed to reorder the classes for the purposes of having the resultant columns in a DataGridView appear in a different order. Unfortunately this seems to be exceedingly difficult; you need to cut and paste properties about, or delete them and re-insert them manually. I *know* you can reorder columns fairly easily in a DataGridView, however that would result in a lot of hardcoding and I want the designer to match up to the grid. Does anyone know of any easier way of achieving this or is cutting/pasting the only available method? I tried manually editing the .designer.cs file, but reordering properties there doesn't appear to do anything!
c#
linq-to-sql
linq
null
null
null
open
How can you easily reorder columns in LINQ to SQL designer? === When designing LINQ classes using the LINQ to SQL designer I've sometimes needed to reorder the classes for the purposes of having the resultant columns in a DataGridView appear in a different order. Unfortunately this seems to be exceedingly difficult; you need to cut and paste properties about, or delete them and re-insert them manually. I *know* you can reorder columns fairly easily in a DataGridView, however that would result in a lot of hardcoding and I want the designer to match up to the grid. Does anyone know of any easier way of achieving this or is cutting/pasting the only available method? I tried manually editing the .designer.cs file, but reordering properties there doesn't appear to do anything!
0
2,689,832
04/22/2010 10:05:53
323,127
04/22/2010 10:00:25
1
0
tracking spacifice color
what is the Min requrments ( hardware and software )to write acode that can track spacific colored-object?
c#
opencv
null
null
null
04/23/2010 03:16:04
not a real question
tracking spacifice color === what is the Min requrments ( hardware and software )to write acode that can track spacific colored-object?
1
7,863,085
10/22/2011 22:37:48
1,009,005
10/22/2011 22:19:57
1
0
Within my for loop it appears that it is ignoring if statements
I'm pretty new at java and I've been trying to write a method that draws a gradient from one configurable color to another. However, it appears that if statements inside of the for loop are being ignored. How can I fix this? or is there something else I'm missing? and usage of the method is: Gradient.dVertical(Graphics,Top left corner X,Top left corner Y,Size X,Size Y,tarting Red Value,Starting Green Value,Starting Blue Value,Ending Red Value,Ending Green Value,Ending Blue Value); class Gradient extends Applet { public static void dVertical(Graphics g, int posX,int posY,int sizeX,int sizeY,int sred, int sgreen, int sblue, int ered,int egreen,int eblue) { //establishes what the intitial value of colors should be int rr = sred; int gg = sgreen; int bb = sblue; //calculates the difference between the starting and ending //color values int rdif = sred-ered; int gdif = sgreen-egreen; int bdif = sblue-eblue; //creates values that will be used for conditionals and loops boolean rrepeat; boolean grepeat; boolean brepeat; int rrate; int grate; int brate; int check; //determines whether or not values must repeat for red if (sizeX <= rdif) { //calculates change rate in ammount per pixel for red rrate = rdif/sizeX; rrepeat = false; } else { //calculates change rate in pixels per 1 for red rrate = sizeX/rdif; rrepeat = true; } //determines whether or not values must repeat for green if (sizeX <= gdif) { //calculates change rate in ammount per pixel for green grate = gdif/sizeX; grepeat = false; } else { //calculates change rate in pixels per 1 for green grate = sizeX/gdif; grepeat = true; } //determines whether or not values must repeat for blue if (sizeX <= bdif) { //calculates change rate in ammount per pixel for brate = bdif/sizeX; brepeat = false; } else { //calculates change rate in pixels per 1 for blue brate = sizeX/bdif; brepeat = true; } //set initial value for increment of line position int inc = 0; //*SHOULD* draw the gradient for(int k = 1; k<=sizeX;k++) { //changes color to the next one g.setColor(new Color(rr,gg,bb)); //draws a line dependent on the number of times the loop has completed g.drawLine(posX+inc,posY,posX+inc,posY+sizeY); //determines whether or not to increment red if (rrepeat == true) { //prevents division by zero if(rrate!=0) { //for a rate that must repeat checks //whether or not it is time to increment check = k%rrate; if (check==0) { rr++; } else { rr = rr; } } } //for a rate that does not repeat increments by that rate else { rr += rrate; } //determines whether or not to increment green if (grepeat == true) { //prevents division by zero if(grate!=0) { //for a rate that must repeat checks //whether or not it is time to increment check = k%grate; if (check==0) { gg++; } else { gg = gg; } } } //for a rate that does not repeat increments by that rate else { gg+= grate; } //determines whether or not to increment blue if (brepeat == true) { //prevents division by zero if(brate!=0) { //for a rate that must repeat checks //whether or not it is time to increment check = k%brate; if (check==0) { bb++; } else { bb = bb; } } } //for a rate that does not repeat increments by that rate else { bb += brate; } inc++; } } }
java
if-statement
for-loop
null
null
null
open
Within my for loop it appears that it is ignoring if statements === I'm pretty new at java and I've been trying to write a method that draws a gradient from one configurable color to another. However, it appears that if statements inside of the for loop are being ignored. How can I fix this? or is there something else I'm missing? and usage of the method is: Gradient.dVertical(Graphics,Top left corner X,Top left corner Y,Size X,Size Y,tarting Red Value,Starting Green Value,Starting Blue Value,Ending Red Value,Ending Green Value,Ending Blue Value); class Gradient extends Applet { public static void dVertical(Graphics g, int posX,int posY,int sizeX,int sizeY,int sred, int sgreen, int sblue, int ered,int egreen,int eblue) { //establishes what the intitial value of colors should be int rr = sred; int gg = sgreen; int bb = sblue; //calculates the difference between the starting and ending //color values int rdif = sred-ered; int gdif = sgreen-egreen; int bdif = sblue-eblue; //creates values that will be used for conditionals and loops boolean rrepeat; boolean grepeat; boolean brepeat; int rrate; int grate; int brate; int check; //determines whether or not values must repeat for red if (sizeX <= rdif) { //calculates change rate in ammount per pixel for red rrate = rdif/sizeX; rrepeat = false; } else { //calculates change rate in pixels per 1 for red rrate = sizeX/rdif; rrepeat = true; } //determines whether or not values must repeat for green if (sizeX <= gdif) { //calculates change rate in ammount per pixel for green grate = gdif/sizeX; grepeat = false; } else { //calculates change rate in pixels per 1 for green grate = sizeX/gdif; grepeat = true; } //determines whether or not values must repeat for blue if (sizeX <= bdif) { //calculates change rate in ammount per pixel for brate = bdif/sizeX; brepeat = false; } else { //calculates change rate in pixels per 1 for blue brate = sizeX/bdif; brepeat = true; } //set initial value for increment of line position int inc = 0; //*SHOULD* draw the gradient for(int k = 1; k<=sizeX;k++) { //changes color to the next one g.setColor(new Color(rr,gg,bb)); //draws a line dependent on the number of times the loop has completed g.drawLine(posX+inc,posY,posX+inc,posY+sizeY); //determines whether or not to increment red if (rrepeat == true) { //prevents division by zero if(rrate!=0) { //for a rate that must repeat checks //whether or not it is time to increment check = k%rrate; if (check==0) { rr++; } else { rr = rr; } } } //for a rate that does not repeat increments by that rate else { rr += rrate; } //determines whether or not to increment green if (grepeat == true) { //prevents division by zero if(grate!=0) { //for a rate that must repeat checks //whether or not it is time to increment check = k%grate; if (check==0) { gg++; } else { gg = gg; } } } //for a rate that does not repeat increments by that rate else { gg+= grate; } //determines whether or not to increment blue if (brepeat == true) { //prevents division by zero if(brate!=0) { //for a rate that must repeat checks //whether or not it is time to increment check = k%brate; if (check==0) { bb++; } else { bb = bb; } } } //for a rate that does not repeat increments by that rate else { bb += brate; } inc++; } } }
0
6,632,050
07/09/2011 01:08:01
698,641
04/08/2011 12:38:14
516
2
Apache2 show localhost as mydomainname.com
I want to record a screencast of a website but it is not live yet. Is it possible in Apache2 to temporarily change localhost to make it look like its the actual web address?
apache2
null
null
null
null
07/09/2011 15:39:37
off topic
Apache2 show localhost as mydomainname.com === I want to record a screencast of a website but it is not live yet. Is it possible in Apache2 to temporarily change localhost to make it look like its the actual web address?
2
5,260,131
03/10/2011 13:16:10
339,676
05/12/2010 19:42:01
344
28
Strange behavior width Safari (iOS) inner/outer width/height
I have been working on a mobile version for one of our services at work, and have been doing some fidling around with [jqTouch][1], and the orientation feature bugs me a bit. So while trying to find a better way to get orientation value (profile or landscape), i found that Mobile Safari is returning some strange values for innerWidth/innerHeight/outerWidth/outerHeight. I have done these test with an iPhone4 with iOS 4.3 My test results: No keyboard | window.innerWidth window.innerHeight window.outerWidth window.outerHeight --------------------------------------------------------------------------------------------------- Pro --> Lan | 480 268 482 420 Lan <-- Pro | 321 418 321 419 Pro <-- Lan | 480 268 482 420 Lan -->--> Lan | 480 268 482 420 Lan <-- Pro | 321 418 321 419 With keyboard | window.innerWidth window.innerHeight window.outerWidth window.outerHeight --------------------------------------------------------------------------------------------------- Pro --> Lan | 321 418 321 419 Lan <-- Pro | 481 269 481 419 Pro <-- Lan | 321 418 321 419 Lan -->--> Lan | 481 269 481 419 Lan <-- Pro | 481 269 481 419 Pro = Profile Lan = Landscape So `Pro --> Lan` means current orientation is Profile moving it 90 degree clockwise to Landscape The main issues as i see it: - `window.outherHeight` is always the same value when the keyboard is showing. - Also with keyboard When rotating 180degree from Landscape to Landscape the returned values are the expected values for a profile orientation If you want to do some further testing, here's something to get you going, you ofcourse need a [jqTouch][1] configured webpage. $(document).ready(function(){ $('body').bind('turn', function(event, info){ var dims = $('#debug').val(); dims = dims + getDimensions(); $('#debug').val(dims); }); }); function getDimensions() { return "screen.width = " + screen.width + "\nscreen.height = " + screen.height + "\nscreen.availWidth = " + screen.availWidth + "\nscreen.availHeight = " + screen.availHeight + "\nwindow.innerWidth = " + window.innerWidth + "\nwindow.innerHeight = " + window.innerHeight + "\nwindow.outerWidth = " + window.outerWidth + "\nwindow.outerHeight = " + window.outerHeight + "\n \n "; } Add `<textarea id="debug" style="width: 100%; height: 300px;"></textarea>` somewhere on your webpage. What i did was doing the rotions as indicated in the test results. Copied the content of the textarea, and send them in an email-to-self. Did this both with and without keybord, keyboard shows if you tap the textarea ;) [1]: http://jqtouch.com
iphone
mobile-safari
iphone-web
jqtouch
null
02/21/2012 11:33:29
too localized
Strange behavior width Safari (iOS) inner/outer width/height === I have been working on a mobile version for one of our services at work, and have been doing some fidling around with [jqTouch][1], and the orientation feature bugs me a bit. So while trying to find a better way to get orientation value (profile or landscape), i found that Mobile Safari is returning some strange values for innerWidth/innerHeight/outerWidth/outerHeight. I have done these test with an iPhone4 with iOS 4.3 My test results: No keyboard | window.innerWidth window.innerHeight window.outerWidth window.outerHeight --------------------------------------------------------------------------------------------------- Pro --> Lan | 480 268 482 420 Lan <-- Pro | 321 418 321 419 Pro <-- Lan | 480 268 482 420 Lan -->--> Lan | 480 268 482 420 Lan <-- Pro | 321 418 321 419 With keyboard | window.innerWidth window.innerHeight window.outerWidth window.outerHeight --------------------------------------------------------------------------------------------------- Pro --> Lan | 321 418 321 419 Lan <-- Pro | 481 269 481 419 Pro <-- Lan | 321 418 321 419 Lan -->--> Lan | 481 269 481 419 Lan <-- Pro | 481 269 481 419 Pro = Profile Lan = Landscape So `Pro --> Lan` means current orientation is Profile moving it 90 degree clockwise to Landscape The main issues as i see it: - `window.outherHeight` is always the same value when the keyboard is showing. - Also with keyboard When rotating 180degree from Landscape to Landscape the returned values are the expected values for a profile orientation If you want to do some further testing, here's something to get you going, you ofcourse need a [jqTouch][1] configured webpage. $(document).ready(function(){ $('body').bind('turn', function(event, info){ var dims = $('#debug').val(); dims = dims + getDimensions(); $('#debug').val(dims); }); }); function getDimensions() { return "screen.width = " + screen.width + "\nscreen.height = " + screen.height + "\nscreen.availWidth = " + screen.availWidth + "\nscreen.availHeight = " + screen.availHeight + "\nwindow.innerWidth = " + window.innerWidth + "\nwindow.innerHeight = " + window.innerHeight + "\nwindow.outerWidth = " + window.outerWidth + "\nwindow.outerHeight = " + window.outerHeight + "\n \n "; } Add `<textarea id="debug" style="width: 100%; height: 300px;"></textarea>` somewhere on your webpage. What i did was doing the rotions as indicated in the test results. Copied the content of the textarea, and send them in an email-to-self. Did this both with and without keybord, keyboard shows if you tap the textarea ;) [1]: http://jqtouch.com
3
3,778,190
09/23/2010 12:09:45
453,562
09/21/2010 06:54:30
6
1
Removing the Window titlebar after adding components [Android]
The question is quite simple "How do I remove the titlebar from a WebView, after adding content ? Normally you use `requestWindowFeature(Window.FEATURE_NO_TITLE);` But you can only use that method before adding content :( So any ideas ? :) Thanks
java
android
android-webview
null
null
null
open
Removing the Window titlebar after adding components [Android] === The question is quite simple "How do I remove the titlebar from a WebView, after adding content ? Normally you use `requestWindowFeature(Window.FEATURE_NO_TITLE);` But you can only use that method before adding content :( So any ideas ? :) Thanks
0
226,505
10/22/2008 16:09:06
25,515
10/06/2008 15:01:43
179
20
Question about URL Validation with Regex
I have the following regex that does a great job matching urls: `((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)` However, it does not handle urls without a prefix, ie. **stackoverflow.com** or **www.google.com** do not match. Anyone know how I can modify this regex to not care if there is a prefix or not?
regex
url
null
null
null
10/22/2008 20:09:20
off topic
Question about URL Validation with Regex === I have the following regex that does a great job matching urls: `((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)` However, it does not handle urls without a prefix, ie. **stackoverflow.com** or **www.google.com** do not match. Anyone know how I can modify this regex to not care if there is a prefix or not?
2
6,081,290
05/21/2011 11:06:05
145,567
07/27/2009 07:10:18
1,518
53
Post-analyzing source control repositories
I came across [gource][1] and was fascinated by the pretty visuals. Ultimately though, it's pretty useless and doesn't provide anything one would consider handy to see. But what sorts of analysis would people like to see? [1]: http://code.google.com/p/gource/
svn
git
mercurial
control
source
05/22/2011 08:23:04
off topic
Post-analyzing source control repositories === I came across [gource][1] and was fascinated by the pretty visuals. Ultimately though, it's pretty useless and doesn't provide anything one would consider handy to see. But what sorts of analysis would people like to see? [1]: http://code.google.com/p/gource/
2
7,087,485
08/17/2011 02:55:18
51,493
01/05/2009 01:17:45
189
7
For experienced developers doing html/css, which is the fastest standards-compliant html editor you use everyday?
I've been doing a LOT of html/css + javascript recently. A quick question to ask those who've been doing it for years which editor they use. At the moment, I hand-code it within Netbeans, in Windows. I'm starting to notice on occasion I do things in a non-standards compliant way and have no idea about it until someone picks me up on it. (My back-end development is in Java). Added to that, I find it quite easy, but also quite time-consuming and am wondering if there's a better way. Maybe even via a GUI! Commercial / non-free recommendations are welcomed. I don't care how much of a resource hog it is either. I've had a browse through these forums and didn't see a similar question less than 2 years old. I also did a bit of a google, however I trust stackoverflow more than google results. Thanks.
javascript
html
css
ide
editor
08/17/2011 03:02:05
not constructive
For experienced developers doing html/css, which is the fastest standards-compliant html editor you use everyday? === I've been doing a LOT of html/css + javascript recently. A quick question to ask those who've been doing it for years which editor they use. At the moment, I hand-code it within Netbeans, in Windows. I'm starting to notice on occasion I do things in a non-standards compliant way and have no idea about it until someone picks me up on it. (My back-end development is in Java). Added to that, I find it quite easy, but also quite time-consuming and am wondering if there's a better way. Maybe even via a GUI! Commercial / non-free recommendations are welcomed. I don't care how much of a resource hog it is either. I've had a browse through these forums and didn't see a similar question less than 2 years old. I also did a bit of a google, however I trust stackoverflow more than google results. Thanks.
4
5,636,244
04/12/2011 13:47:13
128,618
06/25/2009 04:43:13
550
12
Quick remove folder by using rm -rf
I have the folders -folder1_EXP -folder2_EXP -folder3_EXP -folder4_EXP -folder5_EXP -folder6_EXP -folder6 -temp I want to use command `rm -rf` all the folder that _EXP Anyone can told me quick ways to do instead do it one by one.
linux
command-line
null
null
null
04/12/2011 19:28:18
off topic
Quick remove folder by using rm -rf === I have the folders -folder1_EXP -folder2_EXP -folder3_EXP -folder4_EXP -folder5_EXP -folder6_EXP -folder6 -temp I want to use command `rm -rf` all the folder that _EXP Anyone can told me quick ways to do instead do it one by one.
2
8,508,083
12/14/2011 16:33:47
340,621
05/13/2010 19:36:02
737
42
How to add a view inside an UITableView programmatically?
While in the Interface Builder, it's pretty easy to add an `UIView` to an `UITable` and show it correctly, just drag and drop and it's done. But now that's gonna be optional, so it has to be placed programmatically. Here's how it looked like in the interface builder: ![How it looked like in the Interface Builder][1] When I added the new view as a subview, it showed on top of the `UITableView`-content, but the content should have some offset. I tried it with the following code: self.scrollView.frame = CGRectMake(0, -140, self.scrollView.frame.size.width, self.scrollView.frame.size.height); [self.tableView addSubview:self.scrollView]; [self.tableView setContentInset:UIEdgeInsetsMake(140,0,0,0)]; [self.tableView setContentOffset:CGPointMake(0, -140) animated:NO]; That seemed to work, it shows correctly.. But when I scroll down, the section header stays at 140 pixels from the top. So I guess I'm using the wrong approach, but have absolutely no idea how to fix it. Could anyone give me a push in the right direction? [1]: http://i.stack.imgur.com/SmyRT.png
iphone
cocoa-touch
uitableview
uiview
ios5
null
open
How to add a view inside an UITableView programmatically? === While in the Interface Builder, it's pretty easy to add an `UIView` to an `UITable` and show it correctly, just drag and drop and it's done. But now that's gonna be optional, so it has to be placed programmatically. Here's how it looked like in the interface builder: ![How it looked like in the Interface Builder][1] When I added the new view as a subview, it showed on top of the `UITableView`-content, but the content should have some offset. I tried it with the following code: self.scrollView.frame = CGRectMake(0, -140, self.scrollView.frame.size.width, self.scrollView.frame.size.height); [self.tableView addSubview:self.scrollView]; [self.tableView setContentInset:UIEdgeInsetsMake(140,0,0,0)]; [self.tableView setContentOffset:CGPointMake(0, -140) animated:NO]; That seemed to work, it shows correctly.. But when I scroll down, the section header stays at 140 pixels from the top. So I guess I'm using the wrong approach, but have absolutely no idea how to fix it. Could anyone give me a push in the right direction? [1]: http://i.stack.imgur.com/SmyRT.png
0
6,125,268
05/25/2011 13:32:14
686,849
04/01/2011 02:44:20
143
2
problem with converting NSData to NsArray
i have a problem with converting NSData to NSArray my code is: NSData *data = [[NSData alloc] initWithBytes:(const void *)buf length:len]; NSArray *array = [NSKeyedUnarchiver unarchiveObjectWithData:data]; can any one help me to do it.
iphone
objective-c
xcode
null
null
null
open
problem with converting NSData to NsArray === i have a problem with converting NSData to NSArray my code is: NSData *data = [[NSData alloc] initWithBytes:(const void *)buf length:len]; NSArray *array = [NSKeyedUnarchiver unarchiveObjectWithData:data]; can any one help me to do it.
0
7,263,899
08/31/2011 21:51:15
2,011
08/19/2008 19:23:33
1,373
4
onCreate() in ActivityInstrumentationTestCase2 not called when phone is locked/sleeping
I'm writing a test using ActivityInstrumentationTestCase2. When the emulator is open and the activity can get the foreground, my tests works perfectly. When I start the tests wit the phone locked, the activity is not created. This seems to "make sense" since there is no reason to load an activity if it can not get the foreground (the phone is locked!). However, when running a test suite, this leads to false negatives... Here is a sample test public void testSplashscreenRedirectsSomewhereAfterTimeout() throws Exception { Instrumentation.ActivityMonitor monitor = getInstrumentation().addMonitor(SomeActivity.class.getName(), null, false); getActivity(); // to make sure that the activity gets launched Activity activity = monitor.waitForActivityWithTimeout(10000); // waiting for the other activity assertNotNull("BaselineActivity was not called", activity); } when the phone is locked, getActivity() returns the correct activity but its onCreate() method is never called. Any way to get the tests to work even if the screen is locked?
android
testing
activity
android-emulator
null
null
open
onCreate() in ActivityInstrumentationTestCase2 not called when phone is locked/sleeping === I'm writing a test using ActivityInstrumentationTestCase2. When the emulator is open and the activity can get the foreground, my tests works perfectly. When I start the tests wit the phone locked, the activity is not created. This seems to "make sense" since there is no reason to load an activity if it can not get the foreground (the phone is locked!). However, when running a test suite, this leads to false negatives... Here is a sample test public void testSplashscreenRedirectsSomewhereAfterTimeout() throws Exception { Instrumentation.ActivityMonitor monitor = getInstrumentation().addMonitor(SomeActivity.class.getName(), null, false); getActivity(); // to make sure that the activity gets launched Activity activity = monitor.waitForActivityWithTimeout(10000); // waiting for the other activity assertNotNull("BaselineActivity was not called", activity); } when the phone is locked, getActivity() returns the correct activity but its onCreate() method is never called. Any way to get the tests to work even if the screen is locked?
0
11,399,883
07/09/2012 17:13:32
989,562
10/11/2011 13:07:19
190
1
Ruby or perl or Python for webcrawler and search engine
I need to write a web crawler and search engine. I am basically from JAVA where we have a lot of libraries like crawler4j,lucene,etc. But i can't use JAVA for some reason so i need know which language is better for a web crawler in case of memory management ,efficiency etc.. Any one who has experience in perl,ruby,python languages give some feedback.
python
ruby
perl
null
null
07/09/2012 17:19:26
not a real question
Ruby or perl or Python for webcrawler and search engine === I need to write a web crawler and search engine. I am basically from JAVA where we have a lot of libraries like crawler4j,lucene,etc. But i can't use JAVA for some reason so i need know which language is better for a web crawler in case of memory management ,efficiency etc.. Any one who has experience in perl,ruby,python languages give some feedback.
1
8,122,819
11/14/2011 14:12:13
1,045,722
11/14/2011 14:02:31
1
0
GNU screen session dies when I open vim or vi
Sometimes it dies in the moment a file is opened. Sometimes it allows me to browse the same file and dies on tenth PageDown, for example. I set "term xterm" in .screenrc.
vim
screen
null
null
null
11/14/2011 20:07:27
off topic
GNU screen session dies when I open vim or vi === Sometimes it dies in the moment a file is opened. Sometimes it allows me to browse the same file and dies on tenth PageDown, for example. I set "term xterm" in .screenrc.
2
7,154,482
08/22/2011 22:43:50
841,767
07/12/2011 23:58:58
64
5
What's the appropriate Hungarian Notation prefix for a PHP stdClass?
If there is one, that is. (Such as nInteger, chChar, cCount or rgArray.)
php
naming-conventions
hungarian-notation
null
null
08/23/2011 01:46:36
not constructive
What's the appropriate Hungarian Notation prefix for a PHP stdClass? === If there is one, that is. (Such as nInteger, chChar, cCount or rgArray.)
4
10,354,193
04/27/2012 16:13:52
1,296,793
03/27/2012 23:15:30
69
8
Protype $$ in IE9
I'm fairly new to prototype, but I'm experiencing some weird behaviour. From what I understand using $$('yourcssselector') allows you to select multiple elements using a CSS selector. In FF, Chrome, Safari this all works fine. However, in IE9 I'm getting undefined errors in my code using this. What I've found is if you run this: console.log($$('.btn1').size().size()); I get: LOG: 1 But then if I run the exact same query again, I get LOG: 0 In my code, this .btn1 is being called more than once with that sort of selector, so I'm wondering am I using this correctly, or is this a common IE bug?
javascript
internet-explorer
internet-explorer-9
prototype
null
null
open
Protype $$ in IE9 === I'm fairly new to prototype, but I'm experiencing some weird behaviour. From what I understand using $$('yourcssselector') allows you to select multiple elements using a CSS selector. In FF, Chrome, Safari this all works fine. However, in IE9 I'm getting undefined errors in my code using this. What I've found is if you run this: console.log($$('.btn1').size().size()); I get: LOG: 1 But then if I run the exact same query again, I get LOG: 0 In my code, this .btn1 is being called more than once with that sort of selector, so I'm wondering am I using this correctly, or is this a common IE bug?
0
10,361,256
04/28/2012 06:38:10
1,357,484
04/26/2012 00:15:17
6
0
Powershell interception shell or trapping error shell
How to do trapping error shell? For example: Create a directory: If there is, an error occurred mkdir "c:\test"
powershell
error-handling
try-catch
trap
null
04/30/2012 13:15:24
not a real question
Powershell interception shell or trapping error shell === How to do trapping error shell? For example: Create a directory: If there is, an error occurred mkdir "c:\test"
1
11,475,970
07/13/2012 18:09:30
1,514,165
07/10/2012 08:27:16
8
0
Installed SQL Server 2008 R2 - sa password
For SQL SERVER 2008 R2, In my company, they give me a computer which was used by another employeer. SQL Server 2008 R2 was installed but I don't know 'sa' password. When I want to alter login, it gives below error. "Cannot alter the login 'sa', because it does not exist or you do not have permission." When I want to restore a database, it gives pergaimission error again. (When I enter the Security --> Logins --> sa --> Properties windows authentication is disabled.) Can I change it? P.S: Password is not "password" :)
sql
sql-server-2008
null
null
null
07/14/2012 21:07:09
off topic
Installed SQL Server 2008 R2 - sa password === For SQL SERVER 2008 R2, In my company, they give me a computer which was used by another employeer. SQL Server 2008 R2 was installed but I don't know 'sa' password. When I want to alter login, it gives below error. "Cannot alter the login 'sa', because it does not exist or you do not have permission." When I want to restore a database, it gives pergaimission error again. (When I enter the Security --> Logins --> sa --> Properties windows authentication is disabled.) Can I change it? P.S: Password is not "password" :)
2
9,779,074
03/19/2012 22:48:27
1,279,686
03/19/2012 22:45:38
1
0
find null value in one column and replace it with value from another column in excel sheet
Find "null" values in "full_name" column and replace them with corresponding (values in same row) values from "contact_name" column
excel
replace
find
null
null
03/20/2012 00:59:59
not a real question
find null value in one column and replace it with value from another column in excel sheet === Find "null" values in "full_name" column and replace them with corresponding (values in same row) values from "contact_name" column
1
3,543,880
08/22/2010 23:22:09
427,916
05/10/2010 23:29:01
1
0
Propel: negate multiple conditions
I need to negate multiple conditions at once using Propel. E. g. a corresponding sql condition is: WHERE !(something = 'a' and someOtherThing = 'b') I couldn't find a way to solve this using Propel ORM. Is there a way to build this query with the Criteria-API that Propel 1.3 provides?
php
query
orm
where-clause
propel
null
open
Propel: negate multiple conditions === I need to negate multiple conditions at once using Propel. E. g. a corresponding sql condition is: WHERE !(something = 'a' and someOtherThing = 'b') I couldn't find a way to solve this using Propel ORM. Is there a way to build this query with the Criteria-API that Propel 1.3 provides?
0
3,567,301
08/25/2010 15:04:48
369,166
06/17/2010 09:33:07
35
4
Multiple identities for website in IIS for use with subdomains
Currently whenever a new subdomain is created for the site, a new host header value needs to be added manually in IIS for it to work (needs to work with and without SSL). Is there a way to set host header value via API so that subdomains can be created without human intervention?
iis6
null
null
null
null
null
open
Multiple identities for website in IIS for use with subdomains === Currently whenever a new subdomain is created for the site, a new host header value needs to be added manually in IIS for it to work (needs to work with and without SSL). Is there a way to set host header value via API so that subdomains can be created without human intervention?
0
6,634,664
07/09/2011 12:14:34
104,775
05/11/2009 13:06:13
1,576
70
Is there a way to use HTML5's Web Sockets or EventSource APIs with ASP.NET or ASP.NET MVC?
I've been searching for .NET based solution of the server side of an HTML5 app which uses web sockets and event source. Is there something out there? I've run across some initiatives but they all were out of date...
asp.net
asp.net-mvc
null
null
null
null
open
Is there a way to use HTML5's Web Sockets or EventSource APIs with ASP.NET or ASP.NET MVC? === I've been searching for .NET based solution of the server side of an HTML5 app which uses web sockets and event source. Is there something out there? I've run across some initiatives but they all were out of date...
0
9,927,963
03/29/2012 14:55:33
1,026,321
11/02/2011 18:59:02
1
0
Passing xml data to Restful using c#
I want to pass xml data to Restful web service,How do i go about this in C#.
xml
linq
rest
null
null
03/29/2012 15:07:50
not a real question
Passing xml data to Restful using c# === I want to pass xml data to Restful web service,How do i go about this in C#.
1
7,667,308
10/05/2011 20:27:16
344,520
05/18/2010 21:29:42
369
0
Entity Framework 4 Collection to Binary Column
one of my entities contains a collection of objects i would like to persist to a binary column in the database and get populated on fetching. is this supported with EF or do i need to manually handle this in my repository?
c#
.net
entity-framework
ado.net
null
null
open
Entity Framework 4 Collection to Binary Column === one of my entities contains a collection of objects i would like to persist to a binary column in the database and get populated on fetching. is this supported with EF or do i need to manually handle this in my repository?
0
949,352
06/04/2009 08:53:55
110,028
05/20/2009 16:17:43
10
0
In Java, Is there such thing as instanceOf(Class<?> c)?
I want to check if an object o is an instance of the class c or of a subclass of c. For instance, if p is of class Point I want x.instanceOf(Point.class) to be true and also x.instanceOf(Object.class) to be true. I want it to work also for primitive types. For instance, if x is an integer then x.instanceOf(Integer.class) and also x.instanceOf(Object.class) should be true. Is there such a thing? If not, how can I implement such a method? Thanks.
java
reflection
instanceof
null
null
null
open
In Java, Is there such thing as instanceOf(Class<?> c)? === I want to check if an object o is an instance of the class c or of a subclass of c. For instance, if p is of class Point I want x.instanceOf(Point.class) to be true and also x.instanceOf(Object.class) to be true. I want it to work also for primitive types. For instance, if x is an integer then x.instanceOf(Integer.class) and also x.instanceOf(Object.class) should be true. Is there such a thing? If not, how can I implement such a method? Thanks.
0
11,644,325
07/25/2012 07:03:45
1,545,410
07/23/2012 09:12:59
1
0
how to Retrive data between two <br/> tags
I want to get the data between the two <br/> tags. The data in xml file is like this <br/>lots of data<br/>. Now i Want get the data between the two br tags and fetch specific data in it. Can any one suggest me how to search the tags and fetch the specific data between them.
c#
regex
null
null
null
07/25/2012 16:48:21
not a real question
how to Retrive data between two <br/> tags === I want to get the data between the two <br/> tags. The data in xml file is like this <br/>lots of data<br/>. Now i Want get the data between the two br tags and fetch specific data in it. Can any one suggest me how to search the tags and fetch the specific data between them.
1
714,309
04/03/2009 14:59:36
31,750
10/27/2008 10:03:34
57
4
Virtual Directory in Web Setup Project
I have a web setup project which by default shows the virtual directory in the textbox installer screen. I wish that the virtual directory name cannot be edited by the user and always defaults to the one I have setup in my msi. How can this be achieved?
msi
web-setup-project
null
null
null
null
open
Virtual Directory in Web Setup Project === I have a web setup project which by default shows the virtual directory in the textbox installer screen. I wish that the virtual directory name cannot be edited by the user and always defaults to the one I have setup in my msi. How can this be achieved?
0
1,379,540
09/04/2009 14:14:55
61,342
02/02/2009 02:48:57
1,325
24
Learning Sclala.
What was your methodology to learn Scala? (exercises? small project? library? manual?) What surprises have you encountered when you have been learning Scala? Both subjectively positive and negative. Please state also what is your background i.e. primary language of your choice.
scala
null
null
null
null
09/17/2011 17:16:02
not constructive
Learning Sclala. === What was your methodology to learn Scala? (exercises? small project? library? manual?) What surprises have you encountered when you have been learning Scala? Both subjectively positive and negative. Please state also what is your background i.e. primary language of your choice.
4
5,185,695
03/03/2011 19:46:22
245,926
01/07/2010 20:59:05
317
7
Changing the look of the Butotn Part Of A RadioButton Silverlight
I have been looking on the net for some way to change the look of a basic radiobutton in silverlight. Say I want the actual button to have a blue border and a yellow background. And when its checked I want the little circle that fills in the radio button to be red. I wanna do this for the radio button on the windows phone.
silverlight
null
null
null
null
null
open
Changing the look of the Butotn Part Of A RadioButton Silverlight === I have been looking on the net for some way to change the look of a basic radiobutton in silverlight. Say I want the actual button to have a blue border and a yellow background. And when its checked I want the little circle that fills in the radio button to be red. I wanna do this for the radio button on the windows phone.
0
8,998,962
01/25/2012 07:04:16
1,166,857
01/24/2012 11:24:07
1
0
SQL Delete specific rows based on criteria
I'm battling to get this code to work. It has to identify duplicate fields (a unique value, AcctPerYear has been created for this purpose) and delete one of them. Please assist, herewith my current code. It does delete some records, but not all duplicates. ALTER TABLE [Autoline_DW].[dbo].[GLT_NL_NomAccHistFile] DROP COLUMN [ID_Nr] ALTER TABLE [Autoline_DW].[dbo].[GLT_NL_NomAccHistFile] ADD ID_Nr int IDENTITY(1,1) /* The aggregate 'Dupl' should probably populate the AccPerYear field with a 2, ONLY for the duplicate */ SELECT CAST([AccountCode] as char) + '_' + CAST([NLPeriod] as varchar(2))+'_' + CAST([NLYear] as varchar(4)) as Dupl FROM [Autoline_DW].[dbo].[GLT_NL_NomAccHistFile] GROUP BY [AccountCode],[NLYear],[NLPeriod] HAVING COUNT('Dupl')>1 ORDER by 'Dupl' DELETE FROM [Autoline_DW].[dbo].[GLT_NL_NomAccHistFile] WHERE [ID_Nr] in (select MAX([ID_Nr]) FROM [Autoline_DW].[dbo].[GLT_NL_NomAccHistFile] GROUP BY [AccountCode] HAVING COUNT(*) > 1)
delete
discussion
null
null
null
04/05/2012 15:57:28
not a real question
SQL Delete specific rows based on criteria === I'm battling to get this code to work. It has to identify duplicate fields (a unique value, AcctPerYear has been created for this purpose) and delete one of them. Please assist, herewith my current code. It does delete some records, but not all duplicates. ALTER TABLE [Autoline_DW].[dbo].[GLT_NL_NomAccHistFile] DROP COLUMN [ID_Nr] ALTER TABLE [Autoline_DW].[dbo].[GLT_NL_NomAccHistFile] ADD ID_Nr int IDENTITY(1,1) /* The aggregate 'Dupl' should probably populate the AccPerYear field with a 2, ONLY for the duplicate */ SELECT CAST([AccountCode] as char) + '_' + CAST([NLPeriod] as varchar(2))+'_' + CAST([NLYear] as varchar(4)) as Dupl FROM [Autoline_DW].[dbo].[GLT_NL_NomAccHistFile] GROUP BY [AccountCode],[NLYear],[NLPeriod] HAVING COUNT('Dupl')>1 ORDER by 'Dupl' DELETE FROM [Autoline_DW].[dbo].[GLT_NL_NomAccHistFile] WHERE [ID_Nr] in (select MAX([ID_Nr]) FROM [Autoline_DW].[dbo].[GLT_NL_NomAccHistFile] GROUP BY [AccountCode] HAVING COUNT(*) > 1)
1
5,229,489
03/08/2011 07:14:48
354,275
05/31/2010 03:29:22
47
0
Front end first or Back end first. Of the two which is a Good system design pratice?
I have a client right now requiring me to develop a school enrollment system. Now this is the first time im having this kind of challenge. Most of the past software that i created are not that complex. I know most all of you have created complex softwares, i just want your advise on this. Should i design first the front end or back end? thanks!
design
database-design
frontend
backend
null
03/08/2011 10:37:11
off topic
Front end first or Back end first. Of the two which is a Good system design pratice? === I have a client right now requiring me to develop a school enrollment system. Now this is the first time im having this kind of challenge. Most of the past software that i created are not that complex. I know most all of you have created complex softwares, i just want your advise on this. Should i design first the front end or back end? thanks!
2
5,229,831
03/08/2011 07:59:18
95,107
04/23/2009 18:27:20
1,883
106
Updating a table (with audit trigger using Service Broker) in a Transaction
We have implemented Auditing capability using service broker and have implemented triggers on the tables that need to be audited. The issue we are facing is when we try to update an auditable table from within a transaction, it throws up an error - > The current transaction cannot be > committed and cannot support > operations that write to the log file. > Roll back the transaction. However, if we remove the trigger from the auditable table, it all works absolutely fine. is it not possible to have a table (with trigger) be updated within a transaction or are we missing something at our end ?
sql
sql-server-2008
transactions
triggers
audit-tables
null
open
Updating a table (with audit trigger using Service Broker) in a Transaction === We have implemented Auditing capability using service broker and have implemented triggers on the tables that need to be audited. The issue we are facing is when we try to update an auditable table from within a transaction, it throws up an error - > The current transaction cannot be > committed and cannot support > operations that write to the log file. > Roll back the transaction. However, if we remove the trigger from the auditable table, it all works absolutely fine. is it not possible to have a table (with trigger) be updated within a transaction or are we missing something at our end ?
0
11,490,919
07/15/2012 09:41:22
1,526,708
07/15/2012 09:38:34
1
0
How do I read something from php in java e.g: a varible
So, what I want to do is: I want my program to read the varible so if it is 1 on the page then in my java app, it makes that true, but i'm not expert on php so would it be as follows PHP Script echo 0 if (I don't know how to read php in java, page shiz = 0){ varible = true }
java
php
null
null
null
07/15/2012 09:46:44
not a real question
How do I read something from php in java e.g: a varible === So, what I want to do is: I want my program to read the varible so if it is 1 on the page then in my java app, it makes that true, but i'm not expert on php so would it be as follows PHP Script echo 0 if (I don't know how to read php in java, page shiz = 0){ varible = true }
1
3,785,288
09/24/2010 08:13:34
1,427,536
03/09/2010 10:03:02
376
0
how to fetch userID
how do I fetch a user ID that is associated with the email address entered by the user in the text box?
c#
asp.net
null
null
null
09/24/2010 22:08:33
not a real question
how to fetch userID === how do I fetch a user ID that is associated with the email address entered by the user in the text box?
1
10,048,209
04/06/2012 19:20:52
847,900
07/16/2011 15:35:57
23
1
Generating sum sequences of a number
Let n = a1*1 + a2*2 + ... + an*n. For a given n generate and print out all the different values of (a1, a2, ... , an). I am looking for an alogorithm here. Thanks
algorithm
math
sequence
null
null
04/07/2012 03:56:24
not a real question
Generating sum sequences of a number === Let n = a1*1 + a2*2 + ... + an*n. For a given n generate and print out all the different values of (a1, a2, ... , an). I am looking for an alogorithm here. Thanks
1
7,502,221
09/21/2011 15:12:34
546,050
12/17/2010 12:25:52
5
0
OS X Lion Server - Apache Question - index.html.en
I've added some additional sites to my apache config today, however the default document root should serve the "It Works" index.html.en apache default page. However I must of altered something by accident as it now displays the directory listing by default instead? If I navigate to index.html.en it successfully loads, but not by default when I enter 127.0.0.1 for example. I'm sure the .en language files are resolved by httpd-languages.conf, I have doubled checked that files dependancies are included in httpd.conf 'mod_mime' & 'mod_negotiation'. The problem shouldn't bother me to much but I would like to discover the cause if possible?
osx
apache
osx-lion
null
null
null
open
OS X Lion Server - Apache Question - index.html.en === I've added some additional sites to my apache config today, however the default document root should serve the "It Works" index.html.en apache default page. However I must of altered something by accident as it now displays the directory listing by default instead? If I navigate to index.html.en it successfully loads, but not by default when I enter 127.0.0.1 for example. I'm sure the .en language files are resolved by httpd-languages.conf, I have doubled checked that files dependancies are included in httpd.conf 'mod_mime' & 'mod_negotiation'. The problem shouldn't bother me to much but I would like to discover the cause if possible?
0
1,195,313
07/28/2009 16:43:44
109,035
05/18/2009 21:44:38
804
53
Type II dimension joins
I have the following table lookup table in OLTP CREATE TABLE TransactionState ( TransactionStateId INT IDENTITY (1, 1) NOT NULL, TransactionStateName VarChar (100) ) When this comes into my OLAP, I change the structure as follows: CREATE TABLE TransactionState ( TransactionStateId INT NOT NULL, /* not an IDENTITY column in OLAP */ TransactionStateName VarChar (100) NOT NULL, StartDateTime DateTime NOT NULL, EndDateTime NULL ) My question is regarding the TransactionStateId column. Over time, I may have duplicate TransactionStateId values in my OLAP, but with the combination of StartDateTime and EndDateTime, they would be unique. I have seen samples of Type-2 Dimensions where an OriginalTransactionStateId is added and the incoming TransactionStateId is mapped to it, plus a new TransactionStateId IDENTITY field becomes the PK and is used for the joins. CREATE TABLE TransactionState ( TransactionStateId INT IDENTITY (1, 1) NOT NULL, OriginalTransactionStateId INT NOT NULL, /* not an IDENTITY column in OLAP */ TransactionStateName VarChar (100) NOT NULL, StartDateTime DateTime NOT NULL, EndDateTime NULL ) Should I go with bachellorete #2 or bachellorete #3?
sql
datawarehouse
dimensions
type-2-dimension
sql-server
null
open
Type II dimension joins === I have the following table lookup table in OLTP CREATE TABLE TransactionState ( TransactionStateId INT IDENTITY (1, 1) NOT NULL, TransactionStateName VarChar (100) ) When this comes into my OLAP, I change the structure as follows: CREATE TABLE TransactionState ( TransactionStateId INT NOT NULL, /* not an IDENTITY column in OLAP */ TransactionStateName VarChar (100) NOT NULL, StartDateTime DateTime NOT NULL, EndDateTime NULL ) My question is regarding the TransactionStateId column. Over time, I may have duplicate TransactionStateId values in my OLAP, but with the combination of StartDateTime and EndDateTime, they would be unique. I have seen samples of Type-2 Dimensions where an OriginalTransactionStateId is added and the incoming TransactionStateId is mapped to it, plus a new TransactionStateId IDENTITY field becomes the PK and is used for the joins. CREATE TABLE TransactionState ( TransactionStateId INT IDENTITY (1, 1) NOT NULL, OriginalTransactionStateId INT NOT NULL, /* not an IDENTITY column in OLAP */ TransactionStateName VarChar (100) NOT NULL, StartDateTime DateTime NOT NULL, EndDateTime NULL ) Should I go with bachellorete #2 or bachellorete #3?
0
2,723,309
04/27/2010 17:05:12
327,086
04/27/2010 17:05:12
1
0
How do you ensure a Utility Projects library dependency gets packaged in the final EAR in Eclipse Galileo?
I have a 'Utilty Project', and an 'EAR Project' that includes that 'Utility Project'. All the classes from the 'Utility Project' end up being packaged as a JAR and placed within the 'lib' directory of the exported EAR, for example: EAR.ear META-INF MANIFEST.MF lib utility.jar (which expands to): META-INF MANIFEST.MF com acme Foo.class Bar.class However, the 'Utility Project' relies on a library (freemarker.jar) that has been added to the build path using 'Properties > Java Build Path > Libraries'. All I want to do is to get freemarker.jar added to the EAR as follows: EAR.ear META-INF MANIFEST.MF lib **freemarker.jar** utility.jar (which expands to): META-INF MANIFEST.MF com acme Foo.class Bar.class By searching around within Eclipse I've found 4 potential avenues for achieving this, none of which have worked. If someone can just cut to the chase and tell me what I should actually do, that would be great. But just in case, I'll iterate them here: **From the 'Utility Project' Properties:** 1. If I click 'Java Build Path > Order and Export' and select 'freemarker.jar' for export, the jar does not end up in the EAR file at all. 2. If I click 'Java EE Module Dependencies' and select the 'freemarker.jar' library as a dependency, it says: > This JAR is a bundled library of an > EAR project and is supposed to be > packed in the EAR's library directory. > It conflicts with the manifest class > path dependency you are trying to > create. If you create this dependency, > the JAR will be packed in the root > (not library) directory of the EAR. > Are you sure you want to proceed? **From the 'EAR Project' Properties:** 3. If I click 'Java EE Module Dependencies > Add JARs...' and navigate to the 'freemarker.jar', and make it a dependency, it gets added to the root of the EAR: /freemarker.jar 4. If I do the same as above, but check the 'In Lib Dir' checkbox, it gets added into the lib folder, but contained within another lib folder: /lib/lib/freemarker.jar Thanks.
eclipse
ear
utility
null
null
null
open
How do you ensure a Utility Projects library dependency gets packaged in the final EAR in Eclipse Galileo? === I have a 'Utilty Project', and an 'EAR Project' that includes that 'Utility Project'. All the classes from the 'Utility Project' end up being packaged as a JAR and placed within the 'lib' directory of the exported EAR, for example: EAR.ear META-INF MANIFEST.MF lib utility.jar (which expands to): META-INF MANIFEST.MF com acme Foo.class Bar.class However, the 'Utility Project' relies on a library (freemarker.jar) that has been added to the build path using 'Properties > Java Build Path > Libraries'. All I want to do is to get freemarker.jar added to the EAR as follows: EAR.ear META-INF MANIFEST.MF lib **freemarker.jar** utility.jar (which expands to): META-INF MANIFEST.MF com acme Foo.class Bar.class By searching around within Eclipse I've found 4 potential avenues for achieving this, none of which have worked. If someone can just cut to the chase and tell me what I should actually do, that would be great. But just in case, I'll iterate them here: **From the 'Utility Project' Properties:** 1. If I click 'Java Build Path > Order and Export' and select 'freemarker.jar' for export, the jar does not end up in the EAR file at all. 2. If I click 'Java EE Module Dependencies' and select the 'freemarker.jar' library as a dependency, it says: > This JAR is a bundled library of an > EAR project and is supposed to be > packed in the EAR's library directory. > It conflicts with the manifest class > path dependency you are trying to > create. If you create this dependency, > the JAR will be packed in the root > (not library) directory of the EAR. > Are you sure you want to proceed? **From the 'EAR Project' Properties:** 3. If I click 'Java EE Module Dependencies > Add JARs...' and navigate to the 'freemarker.jar', and make it a dependency, it gets added to the root of the EAR: /freemarker.jar 4. If I do the same as above, but check the 'In Lib Dir' checkbox, it gets added into the lib folder, but contained within another lib folder: /lib/lib/freemarker.jar Thanks.
0
7,286,633
09/02/2011 16:40:35
925,683
09/02/2011 16:36:33
1
0
Can I use Zend Modules to "white label" my Zend Application
I work on this Facebook application that has to be "white labeled" for different "brands". The "white labeled" version will use the same domain and the same DB as the current one. The layout and styling of the pages will change, but the most part of the business logic will be common between the "white labeled" and the current application. I thought that a smart way to do that would be to make a Zend Module of my current application, and to make another module for the white labeled application. This second module would "inherit" from the first one, so I won't have to duplicate the whole code. The logic specific to "white labeled" will be coded in the second module, and global features in the first one. But from what a read about modules, the global feeling is that they must correspond to independent features, that's why I'm thinking my approach is not good... What do you think of it and, more generally, what do you think is the good approach to white label a Zend Application ?
php
zend-framework
null
null
null
null
open
Can I use Zend Modules to "white label" my Zend Application === I work on this Facebook application that has to be "white labeled" for different "brands". The "white labeled" version will use the same domain and the same DB as the current one. The layout and styling of the pages will change, but the most part of the business logic will be common between the "white labeled" and the current application. I thought that a smart way to do that would be to make a Zend Module of my current application, and to make another module for the white labeled application. This second module would "inherit" from the first one, so I won't have to duplicate the whole code. The logic specific to "white labeled" will be coded in the second module, and global features in the first one. But from what a read about modules, the global feeling is that they must correspond to independent features, that's why I'm thinking my approach is not good... What do you think of it and, more generally, what do you think is the good approach to white label a Zend Application ?
0
8,253,629
11/24/2011 07:43:46
527,595
12/02/2010 06:27:04
280
30
Magento: Get products collection which have atleast one category
I want to get products collection that have at-least one category. Actually I want to ignore that products which are not in any category. Can anyone help??? Thanks,
magento
null
null
null
null
null
open
Magento: Get products collection which have atleast one category === I want to get products collection that have at-least one category. Actually I want to ignore that products which are not in any category. Can anyone help??? Thanks,
0
11,469,045
07/13/2012 10:52:14
276,093
01/29/2009 12:50:59
1,605
48
How to limit the maximum size of a Map by removing oldest entries when limit reached
I want an implementation of Map that has a maximum size. I want to use this as a cache and so oldest entries are removed once limit has been reached. I also don't want to introduce a dependency on any 3rd party libraries.
java
caching
collections
map
null
07/13/2012 23:37:39
not a real question
How to limit the maximum size of a Map by removing oldest entries when limit reached === I want an implementation of Map that has a maximum size. I want to use this as a cache and so oldest entries are removed once limit has been reached. I also don't want to introduce a dependency on any 3rd party libraries.
1
6,110,843
05/24/2011 13:02:16
603,128
02/04/2011 12:26:53
50
2
what encoding this is ?
can anyone tell me what encoding is applied on the chinese character, so that chinese characters are converted into this code or text and stored in mysql database : 中`国液化天然æ°â€Ã¨Â¿Â输(控股)有é™Âå…¬å¸控股` original chinese characters which are displayed in web page : 中国液化天然气运输(控股)有限公司控股 on the web page there is a header function is used to make standard chinese chars as follow: header('Content-type: text/html; charset=utf-8'); Thanks...
php
javascript
asp.net
mysql
html
null
open
what encoding this is ? === can anyone tell me what encoding is applied on the chinese character, so that chinese characters are converted into this code or text and stored in mysql database : 中`国液化天然æ°â€Ã¨Â¿Â输(控股)有é™Âå…¬å¸控股` original chinese characters which are displayed in web page : 中国液化天然气运输(控股)有限公司控股 on the web page there is a header function is used to make standard chinese chars as follow: header('Content-type: text/html; charset=utf-8'); Thanks...
0
10,538,664
05/10/2012 16:45:02
1,355,200
04/25/2012 03:48:36
8
0
date variables in php
i written a code for appending the date, month & year variables that are stored in three different variables into an array, and i used the implode function to change that into an appropriate date format..but that is not showing the output as expected... the code is as follows: $year = 2012; $month1 = $_POST["month1"]; $date = $_POST["date"]; $array[] = "{$year}{$month1}{$date}"; $imp = implode('/',$array); echo $imp; here $date and $month1 are taken from the form.... the output is displaying as 20121220 but not as 2012/12/20....what's the wrong with the above code....any help is much appreciated....thanks in advance....
php
datetime
null
null
null
null
open
date variables in php === i written a code for appending the date, month & year variables that are stored in three different variables into an array, and i used the implode function to change that into an appropriate date format..but that is not showing the output as expected... the code is as follows: $year = 2012; $month1 = $_POST["month1"]; $date = $_POST["date"]; $array[] = "{$year}{$month1}{$date}"; $imp = implode('/',$array); echo $imp; here $date and $month1 are taken from the form.... the output is displaying as 20121220 but not as 2012/12/20....what's the wrong with the above code....any help is much appreciated....thanks in advance....
0
5,484,144
03/30/2011 08:55:45
578,318
01/17/2011 09:32:29
46
1
How does JPA relate to EJB relate to Java EE 6
I'm a happy Tomcat user, and wish to use the new Java Persistence API. I'm a little confused as to where I should get it from? I don't find the official documentation regarding my questions very clear. Is Java EE 6 something specific to an EJB container, such as JBoss or Glassfish? Does this mean that if you have an EE 6 container, it automatically supports JPA? Is JPA a specification, or an API? Are Hibernate, Kodo or OpenJPA, DataNucleus, EclipseLink, TopLink all implementation of the JPA specification? The reason I ask is because I don't want to deploy very large files. If the container I'm using supports / contains a JPA API, then I'd rather not deploy one with every application? I had this idea in my head that Tomcat 7's JAR's may have it? Please help, @Confused
tomcat
jpa
null
null
null
null
open
How does JPA relate to EJB relate to Java EE 6 === I'm a happy Tomcat user, and wish to use the new Java Persistence API. I'm a little confused as to where I should get it from? I don't find the official documentation regarding my questions very clear. Is Java EE 6 something specific to an EJB container, such as JBoss or Glassfish? Does this mean that if you have an EE 6 container, it automatically supports JPA? Is JPA a specification, or an API? Are Hibernate, Kodo or OpenJPA, DataNucleus, EclipseLink, TopLink all implementation of the JPA specification? The reason I ask is because I don't want to deploy very large files. If the container I'm using supports / contains a JPA API, then I'd rather not deploy one with every application? I had this idea in my head that Tomcat 7's JAR's may have it? Please help, @Confused
0
11,137,820
06/21/2012 12:09:05
627,161
02/21/2011 19:02:05
1
1
How to prevent a page event to trigger in jquery mobile
The following events are called when transitioning from page A to page B: * pagebeforechange * pagebeforeload * pagebeforecreate * pagecreate * pageinit * pageload * pagebeforechange (yes, again) * pagebeforeshow * pageshow * pagechange I'd like to stop that chain of events at some point to load some dynamic data via AJAX and then restart the chain of events to show a fully complete page. Is that possible?
ajax
events
jquery-mobile
null
null
null
open
How to prevent a page event to trigger in jquery mobile === The following events are called when transitioning from page A to page B: * pagebeforechange * pagebeforeload * pagebeforecreate * pagecreate * pageinit * pageload * pagebeforechange (yes, again) * pagebeforeshow * pageshow * pagechange I'd like to stop that chain of events at some point to load some dynamic data via AJAX and then restart the chain of events to show a fully complete page. Is that possible?
0
3,286,594
07/20/2010 02:37:31
32,840
10/30/2008 17:45:14
527
7
Output of last shell command
In a linux shell, is it possible to return the output of the last command. I realize I could have piped it or sent the output to a file, but my requirement is to retrieve that output after the command has been run. Using csh, but would hear about any shell.
linux
csh
null
null
null
null
open
Output of last shell command === In a linux shell, is it possible to return the output of the last command. I realize I could have piped it or sent the output to a file, but my requirement is to retrieve that output after the command has been run. Using csh, but would hear about any shell.
0
8,959,930
01/22/2012 08:29:53
540,405
12/13/2010 10:45:56
21
0
Android Webview using Fragments to Retain text data across orientation changes
I need to create a webview with Fragment, so that the data in the webview (text in the forms) are not lost when the orientation changes. Like in this example [FragmentRetainInstance.Java][1] I want make webview with setRetainInstance(true) work. [1]: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/FragmentRetainInstance.html I would be using Android Compatibility Package for Fragments, please help me with an example to achieve the above. Thanks in Advance.
android
webview
orientation
android-fragments
null
null
open
Android Webview using Fragments to Retain text data across orientation changes === I need to create a webview with Fragment, so that the data in the webview (text in the forms) are not lost when the orientation changes. Like in this example [FragmentRetainInstance.Java][1] I want make webview with setRetainInstance(true) work. [1]: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/FragmentRetainInstance.html I would be using Android Compatibility Package for Fragments, please help me with an example to achieve the above. Thanks in Advance.
0
4,918,454
02/07/2011 05:59:50
605,992
02/07/2011 05:59:50
1
0
Performance vs Efficency
In programming, what is the difference between performance and efficency of a program?
language-agnostic
programming-languages
null
null
null
02/07/2011 06:19:36
not a real question
Performance vs Efficency === In programming, what is the difference between performance and efficency of a program?
1
5,583,384
04/07/2011 15:13:42
419,261
08/11/2010 07:01:59
148
13
Starting out on an educational site
Im having a har time right now preparin for an entrance exam.But ive found that ther are not a lot of resources available for polytechnic students like me.There fore i would like to create a site which would help others prepare for exams like these.Im an iphone programmer and new to web programming.I guess that a CMS would be useful here.But i need suggestions from more experienced guys.So... Thanks
php
content-management-system
null
null
null
04/07/2011 15:18:07
not a real question
Starting out on an educational site === Im having a har time right now preparin for an entrance exam.But ive found that ther are not a lot of resources available for polytechnic students like me.There fore i would like to create a site which would help others prepare for exams like these.Im an iphone programmer and new to web programming.I guess that a CMS would be useful here.But i need suggestions from more experienced guys.So... Thanks
1
10,275,780
04/23/2012 06:26:50
1,348,244
04/21/2012 11:44:46
1
0
Can't make PCRE
I am trying to make PCRE. Configuration ok. OS: Ubuntu 10.04 Kernel: 2.6.34 (VDS, Xen) Crash log: libtool: compile: unrecognized option `-DHAVE_CONFIG_H' libtool: compile: Try `libtool --help' for more information. make[1]: *** [pcrecpp.lo] Error 1 make[1]: Leaving directory `/root/downloads/pcre-8.30' make: *** [all] Error 2 P.S. Sorry for my bad English =)
linux
ubuntu
pcre
vds
null
04/24/2012 10:41:28
off topic
Can't make PCRE === I am trying to make PCRE. Configuration ok. OS: Ubuntu 10.04 Kernel: 2.6.34 (VDS, Xen) Crash log: libtool: compile: unrecognized option `-DHAVE_CONFIG_H' libtool: compile: Try `libtool --help' for more information. make[1]: *** [pcrecpp.lo] Error 1 make[1]: Leaving directory `/root/downloads/pcre-8.30' make: *** [all] Error 2 P.S. Sorry for my bad English =)
2
10,235,867
04/19/2012 20:02:55
1,344,959
04/19/2012 19:49:41
1
0
Copying files from one folder to another using AppleScript and a list of file names
I am trying to figure out a way to copy some files from one folder to another using AppleScript. I have a folder containing about 17,000 files. All of the files are named with a number/first name/last name like the following: A123456_John_Doe.tif I also have an excel file that has a list with thousands of numbers on it. The numbers in the list match the beginning number in the file names. I want to copy/move/highlight only the files that are on this list to a new location. I don't know much about AppleScript. Only what I have found out trying to solve this. Please help!
applescript
null
null
null
null
04/22/2012 07:57:43
not a real question
Copying files from one folder to another using AppleScript and a list of file names === I am trying to figure out a way to copy some files from one folder to another using AppleScript. I have a folder containing about 17,000 files. All of the files are named with a number/first name/last name like the following: A123456_John_Doe.tif I also have an excel file that has a list with thousands of numbers on it. The numbers in the list match the beginning number in the file names. I want to copy/move/highlight only the files that are on this list to a new location. I don't know much about AppleScript. Only what I have found out trying to solve this. Please help!
1
6,316,883
06/11/2011 15:46:48
794,083
06/11/2011 15:46:48
1
0
Is there a open source pc reservation software Ican use?
I need to create a computer reservation/bookings software for my school and I wanted to know if there is any similar project I can check out/reuse? Mostly I'm looking for .Net solutions but using PHP/Other lang solution as reference is OK. Thanks in advance
php
asp.net
open-source
null
null
06/11/2011 16:02:08
off topic
Is there a open source pc reservation software Ican use? === I need to create a computer reservation/bookings software for my school and I wanted to know if there is any similar project I can check out/reuse? Mostly I'm looking for .Net solutions but using PHP/Other lang solution as reference is OK. Thanks in advance
2
10,190,743
04/17/2012 11:54:37
274,117
02/16/2010 06:48:21
1,739
9
How could the following database schema be drawn using E/R diagrams?
**How could the following database schema be drawn using E/R diagrams? (A sketch or final image would be helpful).** I would also appreciate if you could guide me to a easy-to-understand tutorial on entity-relationships so I could learn how to draw them on paper first. 1. A CD has a title, a year of production and a CD type. (CD type could be anything: mini-CD, CD-R, CD-RW, DVD-R, DVD-RW...) 2. A CD usually has multiple songs on different tracks. Each song has a name, an artist and a track number. Entity set Song is considered to be **weak** and needs support from entity set CD. 3. A CD is produced by a producer which has a name and an address. 4. A CD may be supplied by multiple suppliers, each has a name and an address. 5. A customer may rent multiple CDs. Customer information such as Social Security Number (SSN), name, telephone needs to be recorded. The date and period of renting (in days) should also be recorded. 6. A customer may be a regular member and a VIP member. A VIP member has additional information such as the starting date of VIP status and percentage of discount. *PS: Is there a software to convert the E/R diagrams into the MySQL relations?*
mysql
sql
database-design
entity-relationship
diagram
null
open
How could the following database schema be drawn using E/R diagrams? === **How could the following database schema be drawn using E/R diagrams? (A sketch or final image would be helpful).** I would also appreciate if you could guide me to a easy-to-understand tutorial on entity-relationships so I could learn how to draw them on paper first. 1. A CD has a title, a year of production and a CD type. (CD type could be anything: mini-CD, CD-R, CD-RW, DVD-R, DVD-RW...) 2. A CD usually has multiple songs on different tracks. Each song has a name, an artist and a track number. Entity set Song is considered to be **weak** and needs support from entity set CD. 3. A CD is produced by a producer which has a name and an address. 4. A CD may be supplied by multiple suppliers, each has a name and an address. 5. A customer may rent multiple CDs. Customer information such as Social Security Number (SSN), name, telephone needs to be recorded. The date and period of renting (in days) should also be recorded. 6. A customer may be a regular member and a VIP member. A VIP member has additional information such as the starting date of VIP status and percentage of discount. *PS: Is there a software to convert the E/R diagrams into the MySQL relations?*
0
1,255,820
08/10/2009 16:17:53
452,521
09/18/2008 15:03:11
1,861
44
Books and literature for implementing a language on the CLR
I'm looking for books and literature on the inner workings of the CLR (and/or possibly the DLR), my long time goal is to implement a simple language on the CLR.
c#
.net
clr
programming-languages
null
09/26/2011 14:12:51
not constructive
Books and literature for implementing a language on the CLR === I'm looking for books and literature on the inner workings of the CLR (and/or possibly the DLR), my long time goal is to implement a simple language on the CLR.
4
10,641,055
05/17/2012 18:02:07
1,186,597
02/03/2012 02:44:15
1
0
Using PyQT for a command prompt (Python) program
How exactly would I go about doing this? Any advice would help
python
pyqt
null
null
null
05/18/2012 22:03:43
not a real question
Using PyQT for a command prompt (Python) program === How exactly would I go about doing this? Any advice would help
1
4,976,601
02/12/2011 05:56:20
613,980
02/12/2011 05:56:20
1
0
Write a C++ program to swap the elements of first column with last column in a 4X4 2-D array!
Write a C++ program to swap the elements of first column with last column in a 4X4 2-D array! I am not getting how to do this one!
c++
swap
null
null
null
02/12/2011 06:22:59
not a real question
Write a C++ program to swap the elements of first column with last column in a 4X4 2-D array! === Write a C++ program to swap the elements of first column with last column in a 4X4 2-D array! I am not getting how to do this one!
1
8,111,926
11/13/2011 13:39:51
447,419
09/14/2010 13:52:44
191
19
iPhone app talking to circuit board via bluetooth
We want our iPhone app to be able to communicate with a circuit board inside an air cleaner. The circuit board inside the air cleaner should receive signals from the iPhone app, and based on those, do certain commands in the air cleaner. So you should basically be able to use the iPhone app to control the air cleaner via bluetooth. We are now searching for information regarding sending data via bluetooth to a circuit board and wonder if any of you have had any experience doing this.
iphone
objective-c
iphone-sdk-4.0
bluetooth
connection
11/14/2011 13:16:46
not a real question
iPhone app talking to circuit board via bluetooth === We want our iPhone app to be able to communicate with a circuit board inside an air cleaner. The circuit board inside the air cleaner should receive signals from the iPhone app, and based on those, do certain commands in the air cleaner. So you should basically be able to use the iPhone app to control the air cleaner via bluetooth. We are now searching for information regarding sending data via bluetooth to a circuit board and wonder if any of you have had any experience doing this.
1
9,905,818
03/28/2012 10:42:01
1,280,656
03/20/2012 10:44:51
1
1
What precautions One should take while sending Data via WCF?
I've got a WCF service that offer Some method. Suppose you have an htmlElement or an xmlElement or even a string containing xml or any object data that you want to send via WCF. Are there any special precautions you have to take?
.net
wcf
null
null
null
03/31/2012 15:00:20
not a real question
What precautions One should take while sending Data via WCF? === I've got a WCF service that offer Some method. Suppose you have an htmlElement or an xmlElement or even a string containing xml or any object data that you want to send via WCF. Are there any special precautions you have to take?
1
5,947,497
05/10/2011 08:45:14
872,441
05/10/2011 07:38:17
1
0
learn sql and c shap help
**i would like to learn C# and sql step by step, any body know related web site please send me**
c#
sql
null
null
null
05/10/2011 08:48:19
not a real question
learn sql and c shap help === **i would like to learn C# and sql step by step, any body know related web site please send me**
1
5,687,314
04/16/2011 14:52:51
530,291
12/04/2010 08:12:16
31
0
choosing a game engine in android
I wanna make a game for android that features a scrolling background, for now it could be only horizontal scrolling but eventually i wanna be able to add vertical scrolling. I started writing a simple basic game using a framework i got from the bad logic games workshop. I created a really simple screen with a character that moves around according to touch. I thought about how i could create the entire world and add the camera class and stuff but then I came to the conclusion that it would be much easier to just work with a game engine that uses openGL. so now I'm having difficulty in choosing between libgdx and andengine. Both seems quite good, libgdx has the advantage that i can easily debug the game on the desktop without using the annoying emulator (though I'm not sure how this would work with touch), and the andengine i think has better support for tile maps. which one do you guys recommend that i learn? or perhaps should i first go through some openGL tutorials? thanks Amit
java
android
game-engine
null
null
04/16/2011 23:17:34
not a real question
choosing a game engine in android === I wanna make a game for android that features a scrolling background, for now it could be only horizontal scrolling but eventually i wanna be able to add vertical scrolling. I started writing a simple basic game using a framework i got from the bad logic games workshop. I created a really simple screen with a character that moves around according to touch. I thought about how i could create the entire world and add the camera class and stuff but then I came to the conclusion that it would be much easier to just work with a game engine that uses openGL. so now I'm having difficulty in choosing between libgdx and andengine. Both seems quite good, libgdx has the advantage that i can easily debug the game on the desktop without using the annoying emulator (though I'm not sure how this would work with touch), and the andengine i think has better support for tile maps. which one do you guys recommend that i learn? or perhaps should i first go through some openGL tutorials? thanks Amit
1
9,176,539
02/07/2012 12:47:53
1,194,656
02/07/2012 12:37:49
1
0
ffmpeg returning nonsense
I use this command ffmpeg -i X.mpg -b 533k –vcodec h263 -ac 1 -ab 48k -acodec aac -strict experimental -s 352x288 X.3gp from cmd to convert file X from mpg to 3gp. I even used this yesterday and it worked. Today I decided to improve the command: ffmpeg –i X.mpg -b 1000k –r 25 –vcodec h263 -ac 1 -ab 15750 –ar 8000 -acodec libopencore_amrnb -s 352x288 X.3gp Now ffmpeg is completely screwed up, it returns garbage like [NULL @ 02EFF020] Unable to find a suitable output format for 'ÔÇôvcodec' ÔÇôvcodec: Invalid argument or [NULL @ 02CBEA80] Unable to find a suitable output format for 'ÔÇôi' ÔÇôi: Invalid argument even if I use the first command, which it worked and now, on the same file, in the same directory, with a new fresh ffmpeg executable from the same archive I extracted it before, it doesn't convert anymore. If I type a nonexistent file as input, ffmpeg gives [NULL @ 02CBEA80] Unable to find a suitable output format for 'ÔÇôr' ÔÇôr: Invalid argument I really don't know what to do. Looks like something really basic has been changed...
console
ffmpeg
output
cmd
null
02/08/2012 14:42:20
off topic
ffmpeg returning nonsense === I use this command ffmpeg -i X.mpg -b 533k –vcodec h263 -ac 1 -ab 48k -acodec aac -strict experimental -s 352x288 X.3gp from cmd to convert file X from mpg to 3gp. I even used this yesterday and it worked. Today I decided to improve the command: ffmpeg –i X.mpg -b 1000k –r 25 –vcodec h263 -ac 1 -ab 15750 –ar 8000 -acodec libopencore_amrnb -s 352x288 X.3gp Now ffmpeg is completely screwed up, it returns garbage like [NULL @ 02EFF020] Unable to find a suitable output format for 'ÔÇôvcodec' ÔÇôvcodec: Invalid argument or [NULL @ 02CBEA80] Unable to find a suitable output format for 'ÔÇôi' ÔÇôi: Invalid argument even if I use the first command, which it worked and now, on the same file, in the same directory, with a new fresh ffmpeg executable from the same archive I extracted it before, it doesn't convert anymore. If I type a nonexistent file as input, ffmpeg gives [NULL @ 02CBEA80] Unable to find a suitable output format for 'ÔÇôr' ÔÇôr: Invalid argument I really don't know what to do. Looks like something really basic has been changed...
2
6,863,442
07/28/2011 17:54:12
469,756
10/08/2010 01:44:23
89
0
PUBMED author/article databse
I am looking for a way to download the author and associated articles database from pubmed or any other source. I can't seem to locate this anywhere on ncbi FTP site. Does anyone know if there's such databse available?
bioinformatics
null
null
null
null
07/28/2011 19:07:59
not a real question
PUBMED author/article databse === I am looking for a way to download the author and associated articles database from pubmed or any other source. I can't seem to locate this anywhere on ncbi FTP site. Does anyone know if there's such databse available?
1
8,031,141
11/06/2011 23:11:44
1,032,889
11/06/2011 23:07:40
1
0
Udating Staus via SMS
Does updating your Facebook status or getting notifications from upddated statuses by your subscribed friend by your phone charge my data plan by my phone carrier? Thank you!
facebook
sms
via
null
null
11/06/2011 23:47:42
off topic
Udating Staus via SMS === Does updating your Facebook status or getting notifications from upddated statuses by your subscribed friend by your phone charge my data plan by my phone carrier? Thank you!
2
10,318,516
04/25/2012 15:10:38
975,816
10/02/2011 21:21:29
801
59
What is the best practice to send unlimited email using PHP
We have a web site basically send daily 10K email notifications to users. I tried to use Google Apps but reach their daily limit quickly and then I create multiple accounts on godaddy and buy smtp relays (daily 250) to provide email notifications to our users.. What is the best practice to provide it without being marked spam and small budget? Maybe I need to install postfix and dovecot? Thank you.
email
postfix
null
null
null
null
open
What is the best practice to send unlimited email using PHP === We have a web site basically send daily 10K email notifications to users. I tried to use Google Apps but reach their daily limit quickly and then I create multiple accounts on godaddy and buy smtp relays (daily 250) to provide email notifications to our users.. What is the best practice to provide it without being marked spam and small budget? Maybe I need to install postfix and dovecot? Thank you.
0
6,449,319
06/23/2011 04:25:17
766,494
05/23/2011 18:26:26
16
0
Format passed time like facebook
Anybody knows how can I format a given time span to be formatted like facebook does? i.e. 30 seconds ago, about an hours ago, yesterday at 8:37pm and so on... thanks!
c#
datetime
formatting
null
null
null
open
Format passed time like facebook === Anybody knows how can I format a given time span to be formatted like facebook does? i.e. 30 seconds ago, about an hours ago, yesterday at 8:37pm and so on... thanks!
0
8,364,523
12/03/2011 00:46:28
1,015,777
10/27/2011 03:00:22
24
0
Web Scraping on iOS apps
do you know any application that is developed in Objective-C that uses web scraping technique? Because I am trying to create an application that will use web scraping and I want to make sure that I can build one using objective-c. Can I do that? Or I have to build the application using a web based language? I know that the web scraping is done by php/python and other languages, I just want to know that such a script will be able to transfer its results to iPhone. I am planing to make the script on a web server, and via a request from the iPhone, the script will run, and give the results back to iPhone in xml format. If you can tell me your ideas about that technique it will be very helpful Thanks a lot
iphone
objective-c
ios
ipad
web-scraping
12/03/2011 05:41:01
not constructive
Web Scraping on iOS apps === do you know any application that is developed in Objective-C that uses web scraping technique? Because I am trying to create an application that will use web scraping and I want to make sure that I can build one using objective-c. Can I do that? Or I have to build the application using a web based language? I know that the web scraping is done by php/python and other languages, I just want to know that such a script will be able to transfer its results to iPhone. I am planing to make the script on a web server, and via a request from the iPhone, the script will run, and give the results back to iPhone in xml format. If you can tell me your ideas about that technique it will be very helpful Thanks a lot
4
7,369,608
09/10/2011 04:25:13
660,833
03/15/2011 15:05:38
310
3
problem in fetching id of child in oneToMany and manytoone biderectional mapping
I am trying to implement a bidirectional mapping b/w parent and child. its a bidirectional mapping and I want to perform some updates on my child object after persisting the child object through parent(i.e owner side is parent). To maintain consistency between parent and child in my object graph I am performing bidirectional setting like following p.getChild().add(c); and c.setParent(p); after persisting this relation as follows parentDao.update(p); when I am trying to access any property from my object graph. It works fine but when i try to fetch id of child from database I get NPE because its not in my object graph. So while c.getName(); works fine but following fails c.getId(); any help is appreciated. how can I read childsId in current session. I have given autocommit as true.
hibernate
spring
persistence
null
null
null
open
problem in fetching id of child in oneToMany and manytoone biderectional mapping === I am trying to implement a bidirectional mapping b/w parent and child. its a bidirectional mapping and I want to perform some updates on my child object after persisting the child object through parent(i.e owner side is parent). To maintain consistency between parent and child in my object graph I am performing bidirectional setting like following p.getChild().add(c); and c.setParent(p); after persisting this relation as follows parentDao.update(p); when I am trying to access any property from my object graph. It works fine but when i try to fetch id of child from database I get NPE because its not in my object graph. So while c.getName(); works fine but following fails c.getId(); any help is appreciated. how can I read childsId in current session. I have given autocommit as true.
0
6,897,517
08/01/2011 11:05:43
846,224
07/15/2011 10:06:55
1
0
Can anybody suggest me a simple Table management System
Hi Guys actuallly I have some problem>I want an interface in which I will just passing my table name and it will create an interface to update select edit and delete data from that table
php
javascript
null
null
null
08/01/2011 12:20:07
not a real question
Can anybody suggest me a simple Table management System === Hi Guys actuallly I have some problem>I want an interface in which I will just passing my table name and it will create an interface to update select edit and delete data from that table
1
2,815,353
05/12/2010 00:26:07
281,792
02/26/2010 04:38:52
1
3
Axis web service can't be invoked from web application
I have a simple axis 1.4 web service which I deployed successfully and can invoke it from main method of a Java class. This works fine but when I try to invoke it from a web application it throws an exception saying 'Class not found' for the class 'ws/impl/AwardWebServiceSoapBindingStub'. I tried to debug it but could not find anything. Any help? Thanks in advance. Regards, Jani.
axis
web-services
null
null
null
null
open
Axis web service can't be invoked from web application === I have a simple axis 1.4 web service which I deployed successfully and can invoke it from main method of a Java class. This works fine but when I try to invoke it from a web application it throws an exception saying 'Class not found' for the class 'ws/impl/AwardWebServiceSoapBindingStub'. I tried to debug it but could not find anything. Any help? Thanks in advance. Regards, Jani.
0
11,242,873
06/28/2012 10:40:41
1,117,189
10/05/2011 20:15:01
29
1
Why are there browser Issues?
I am new to this great and awesome world of Front-End Coding.Its been nearly a year I've worked on JS,CSS,HTML,AJAX and so on. The tedious part always I face while integrating any feature in my app is 'Browser Issues' Code Work Fines on Firefox ,sometimes on Chrome but there is this strange IE. I am aware of this API and Javascript engine different for diff browsers .However cant we have a 'Platform Independent' sort of 'Browser independent' JS coding done. Let me know your views on this . Cheers
javascript
browser
cross-browser
null
null
06/28/2012 10:42:59
not constructive
Why are there browser Issues? === I am new to this great and awesome world of Front-End Coding.Its been nearly a year I've worked on JS,CSS,HTML,AJAX and so on. The tedious part always I face while integrating any feature in my app is 'Browser Issues' Code Work Fines on Firefox ,sometimes on Chrome but there is this strange IE. I am aware of this API and Javascript engine different for diff browsers .However cant we have a 'Platform Independent' sort of 'Browser independent' JS coding done. Let me know your views on this . Cheers
4
11,602,511
07/22/2012 17:38:53
1,473,713
06/22/2012 02:18:02
3
0
Is it possible to write a function that produces two arrays?
using the jQuery autocomplete I have a function that produces an array of friends that a user that entered in the box. This array is called selected_Id. However, our project has expanded and along with the 'friends' selection (<--the one that produces the selected_Id array) we would like to add a 'enemies' function. It is possible to rewrite that snippet of code to produce 2 separate arrays? If I keep them separate, it will call the getfriends function twice (the getfriends function produces an array of available friends that loads into the jQuery ui that the user gets to choose from). here is what I have: $(function() { var available = new Array(); available = getFriends(); available = my_friends function split( val ) { return val.split( /,\s*/ ); } function extractLast( term ) { return split( term ).pop(); } $( "#tags" ) // don't navigate away from the field on tab when selecting an item .bind( "keydown", function( event ) { if ( event.keyCode === $.ui.keyCode.TAB && $( this ).data( "autocomplete" ).menu.active ) { event.preventDefault(); } }) .autocomplete({ minLength: 0, source: function( request, response ) { // delegate back to autocomplete, but extract the last term response( $.ui.autocomplete.filter( available, extractLast( request.term ) ) ); }, focus: function() { // prevent value inserted on focus return false; }, select: function( event, ui ) { var terms = split( this.value ); // remove the current input terms.pop(); // add the selected item //replaced value with label to continue showing the names selected terms.push( ui.item.label); //ui.item.valuethis is where my // add placeholder to get the comma-and-space at the end terms.push( "" ); this.value = terms.join( ", " ); return false; } }); $( "button" ).button(); $( "button" ).click(function() { var selected_Text = $( "#tags" ).val(); var selected_Friends = selected_Text.split(","); //friend name put in the autocomplete box var friend_Name = ""; //selected id of the person in the array var testCount = 0; //i < j --> run through interation once for(var i = 0, j=selected_Friends.length; i<j; i++ ) { friend_Name = selected_Friends[i]; while (friend_Name[0] == " "){ friend_Name = friend_Name.substring(1,friend_Name.length); } for (var k = 0, l = my_friends.length; k<l; k++) { if (friend_Name == my_friends[k]["label"]) { selected_Id.push(my_friends[k]["value"]) testCount++; } else { } } } return false; }); });
javascript
arrays
jquery-ui
null
null
07/23/2012 00:03:47
too localized
Is it possible to write a function that produces two arrays? === using the jQuery autocomplete I have a function that produces an array of friends that a user that entered in the box. This array is called selected_Id. However, our project has expanded and along with the 'friends' selection (<--the one that produces the selected_Id array) we would like to add a 'enemies' function. It is possible to rewrite that snippet of code to produce 2 separate arrays? If I keep them separate, it will call the getfriends function twice (the getfriends function produces an array of available friends that loads into the jQuery ui that the user gets to choose from). here is what I have: $(function() { var available = new Array(); available = getFriends(); available = my_friends function split( val ) { return val.split( /,\s*/ ); } function extractLast( term ) { return split( term ).pop(); } $( "#tags" ) // don't navigate away from the field on tab when selecting an item .bind( "keydown", function( event ) { if ( event.keyCode === $.ui.keyCode.TAB && $( this ).data( "autocomplete" ).menu.active ) { event.preventDefault(); } }) .autocomplete({ minLength: 0, source: function( request, response ) { // delegate back to autocomplete, but extract the last term response( $.ui.autocomplete.filter( available, extractLast( request.term ) ) ); }, focus: function() { // prevent value inserted on focus return false; }, select: function( event, ui ) { var terms = split( this.value ); // remove the current input terms.pop(); // add the selected item //replaced value with label to continue showing the names selected terms.push( ui.item.label); //ui.item.valuethis is where my // add placeholder to get the comma-and-space at the end terms.push( "" ); this.value = terms.join( ", " ); return false; } }); $( "button" ).button(); $( "button" ).click(function() { var selected_Text = $( "#tags" ).val(); var selected_Friends = selected_Text.split(","); //friend name put in the autocomplete box var friend_Name = ""; //selected id of the person in the array var testCount = 0; //i < j --> run through interation once for(var i = 0, j=selected_Friends.length; i<j; i++ ) { friend_Name = selected_Friends[i]; while (friend_Name[0] == " "){ friend_Name = friend_Name.substring(1,friend_Name.length); } for (var k = 0, l = my_friends.length; k<l; k++) { if (friend_Name == my_friends[k]["label"]) { selected_Id.push(my_friends[k]["value"]) testCount++; } else { } } } return false; }); });
3
426,061
01/08/2009 21:33:04
942
08/10/2008 21:10:34
575
37
Leading Remote Development Teams
I'm now in the position that I am leading 2 remote development teams, some in India, some in the USA (I'm based in Scotland) and was looking for some advice and wisdom what will help make me more successful in this pursuit. Already I've found the following: - Regular one to one sessions with each developer helps build trust immensely - Code reviews over Livemeeting can be a chore but are worth while - It's tricky being agile when not in the same building or timezone. It's difficult to get testers fully involved with all the on the fly design decisions - You have little or no time to code as you're working to keep the team moving Tips and experiences will be most helpful. I've led teams on a single site before but this is a whole new challenge!
leading
remote
offshore
null
null
09/23/2011 05:08:40
off topic
Leading Remote Development Teams === I'm now in the position that I am leading 2 remote development teams, some in India, some in the USA (I'm based in Scotland) and was looking for some advice and wisdom what will help make me more successful in this pursuit. Already I've found the following: - Regular one to one sessions with each developer helps build trust immensely - Code reviews over Livemeeting can be a chore but are worth while - It's tricky being agile when not in the same building or timezone. It's difficult to get testers fully involved with all the on the fly design decisions - You have little or no time to code as you're working to keep the team moving Tips and experiences will be most helpful. I've led teams on a single site before but this is a whole new challenge!
2
11,634,389
07/24/2012 15:37:14
1,540,232
07/20/2012 08:54:40
1
0
jbilling source code
when am compiling jbilling source code which is in STS Work space(by using the STS IDE i created that project) at command prompt its showed 34 errors... All errors are belonging to C:\springsource1\sts-2.8.1.RELEASE\workspace-2.8.1\jbilling\src\java\java\com\sapienter\jbilling\client\authentication those classes only... when am compiling same jbilling source code which is i placed in d C:\ jbilling its compiled successfully no error complaints and also grails command create the war file today.. i did this for whether grails working properly or not.... i get big confusion why the grails command make that difference... menas " C:\springsource1\sts-2.8.1.RELEASE\workspace-2.8.1\jbilling" not compiled but at same command prompt "C:\ jbilling"... please provide solution for my problem
grails
null
null
null
null
07/24/2012 17:01:54
not a real question
jbilling source code === when am compiling jbilling source code which is in STS Work space(by using the STS IDE i created that project) at command prompt its showed 34 errors... All errors are belonging to C:\springsource1\sts-2.8.1.RELEASE\workspace-2.8.1\jbilling\src\java\java\com\sapienter\jbilling\client\authentication those classes only... when am compiling same jbilling source code which is i placed in d C:\ jbilling its compiled successfully no error complaints and also grails command create the war file today.. i did this for whether grails working properly or not.... i get big confusion why the grails command make that difference... menas " C:\springsource1\sts-2.8.1.RELEASE\workspace-2.8.1\jbilling" not compiled but at same command prompt "C:\ jbilling"... please provide solution for my problem
1
9,543,076
03/03/2012 03:11:27
1,157,655
01/19/2012 04:19:46
1
0
Android Publisher Account
I want to open an android publisher account. I want to know that should i open that from the india? if not than give the list of the countries which google allows to open an publisher account. thanx in advance.
android
null
null
null
null
03/05/2012 22:07:06
off topic
Android Publisher Account === I want to open an android publisher account. I want to know that should i open that from the india? if not than give the list of the countries which google allows to open an publisher account. thanx in advance.
2
7,518,086
09/22/2011 16:17:04
959,552
09/22/2011 16:17:04
1
0
Jquery .html() of all elements
I have something like this `$('.class').html();`, but it apply only to first element that match it. I'd like to match value of all elements in document with class `.class`.
jquery
null
null
null
null
null
open
Jquery .html() of all elements === I have something like this `$('.class').html();`, but it apply only to first element that match it. I'd like to match value of all elements in document with class `.class`.
0
1,963,117
12/26/2009 10:58:20
445,600
11/14/2009 14:59:51
41
0
general question about Java Swing
I have made a Swing application which is rather simple in functionality. However the code which it consist of became rather large and very messy in my opinion. All the swing components and actions is in one file. So for instance if I was to make a even larger application with more functionality the code will be rather hard to go through. So my question is how to make a good structure of the code. Or if there's a good webpage I can read about it, and if possible some code examples. I have checked Sun's tutorial about Swing, but those a rather simplistic examples they've shown.
java
swing
null
null
null
null
open
general question about Java Swing === I have made a Swing application which is rather simple in functionality. However the code which it consist of became rather large and very messy in my opinion. All the swing components and actions is in one file. So for instance if I was to make a even larger application with more functionality the code will be rather hard to go through. So my question is how to make a good structure of the code. Or if there's a good webpage I can read about it, and if possible some code examples. I have checked Sun's tutorial about Swing, but those a rather simplistic examples they've shown.
0