question_id
int64
4
6.31M
answer_id
int64
7
6.31M
title
stringlengths
9
150
question_body
stringlengths
0
28.8k
answer_body
stringlengths
60
27.2k
question_text
stringlengths
40
28.9k
combined_text
stringlengths
124
39.6k
tags
listlengths
1
6
question_score
int64
0
26.3k
answer_score
int64
0
28.8k
view_count
int64
15
14M
answer_count
int64
0
182
favorite_count
int64
0
32
question_creation_date
stringdate
2008-07-31 21:42:52
2011-06-10 18:12:18
answer_creation_date
stringdate
2008-07-31 22:17:57
2011-06-10 18:14:17
6,225,261
6,225,344
Optimized (armv7) versus Standard (armv6 armv7)
I got the error message below, and I found a solution to it was to set the Architectures field in Xcode to Optimizied(amrv7) gets me past it. But at what cost? What do I lose of gain in doing this and why does this fix it. I like fixes, but dont like fixing things so blind to the consequences. ld: ldr 12-bit displaceme...
Setting the Optimizied(amrv7) will make your app run only on the iPhone 3GS and higher. You will lose any user with an iPhone, iPhone 3G and iPod touch.
Optimized (armv7) versus Standard (armv6 armv7) I got the error message below, and I found a solution to it was to set the Architectures field in Xcode to Optimizied(amrv7) gets me past it. But at what cost? What do I lose of gain in doing this and why does this fix it. I like fixes, but dont like fixing things so blin...
TITLE: Optimized (armv7) versus Standard (armv6 armv7) QUESTION: I got the error message below, and I found a solution to it was to set the Architectures field in Xcode to Optimizied(amrv7) gets me past it. But at what cost? What do I lose of gain in doing this and why does this fix it. I like fixes, but dont like fix...
[ "iphone", "objective-c" ]
0
1
506
1
0
2011-06-03T09:27:55.890000
2011-06-03T09:35:15.933000
6,225,273
6,225,339
NullPointerException using Apache bzip2 library
I am using the BZip2 compression library from Apache Ant. The documentation is given at - http://javadoc.haefelinger.it/org.apache.ant/1.7.1/org/apache/tools/bzip2/CBZip2InputStream.html I keep getting this error when I run the code - Exception in thread "main" java.lang.NullPointerException at org.apache.tools.bzip2.C...
You are opening a FileOutputStream to alicea.txt FileOutputStream fout = new FileOutputStream("alicea.txt"); This OutputStream is never closed in your code, but in the error-Line you open a FileInputStream on the same file: InputStream fileInputStream = new FileInputStream("alicea.txt"); CBZip2InputStream cin = new CBZ...
NullPointerException using Apache bzip2 library I am using the BZip2 compression library from Apache Ant. The documentation is given at - http://javadoc.haefelinger.it/org.apache.ant/1.7.1/org/apache/tools/bzip2/CBZip2InputStream.html I keep getting this error when I run the code - Exception in thread "main" java.lang....
TITLE: NullPointerException using Apache bzip2 library QUESTION: I am using the BZip2 compression library from Apache Ant. The documentation is given at - http://javadoc.haefelinger.it/org.apache.ant/1.7.1/org/apache/tools/bzip2/CBZip2InputStream.html I keep getting this error when I run the code - Exception in thread...
[ "java" ]
4
7
1,129
1
0
2011-06-03T09:28:54.080000
2011-06-03T09:34:52.397000
6,225,277
6,229,072
Some issue with AntBuilder?
When i am deploying grails application, it's show classnotfound Exception in AntBuilder class?. Do i need to add any jar files to project? Thanks in advance. java.lang.ClassNotFoundException: org.apache.tools.ant.launch.AntMain at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCon...
The Ant jars are available in run-app because they're needed to run the scripts. But the jars aren't included in a war because in general Ant isn't used by the web app. But you can include them by declaring a dependency in grails-app/conf/BuildConfig.groovy: dependencies { compile 'org.apache.ant:ant:1.7.1' compile 'or...
Some issue with AntBuilder? When i am deploying grails application, it's show classnotfound Exception in AntBuilder class?. Do i need to add any jar files to project? Thanks in advance. java.lang.ClassNotFoundException: org.apache.tools.ant.launch.AntMain at java.lang.ClassLoader.defineClass1(Native Method) at java.lan...
TITLE: Some issue with AntBuilder? QUESTION: When i am deploying grails application, it's show classnotfound Exception in AntBuilder class?. Do i need to add any jar files to project? Thanks in advance. java.lang.ClassNotFoundException: org.apache.tools.ant.launch.AntMain at java.lang.ClassLoader.defineClass1(Native M...
[ "grails", "ant", "groovy" ]
4
8
1,941
2
0
2011-06-03T09:29:07.397000
2011-06-03T15:23:35.890000
6,225,282
6,225,395
Multiple thread access to a static object of a non-static class
By default non-static methods have their own instance of variables for each thread when accessed via multiple threads, thus rendering them thread safe if they do not include a public variable etc. On the other hand, variables in static methods are shared amongst threads rendering them non-thread safe by default. Say, I...
As long as you only access the ConcurrentDictionary<> instance cache, and don't overwrite cache with a new instance in one of Profile -methods it is threadsafe. Because of the second point, it's better to mark it readonly, private readonly ConcurrentDictionary cache = new ConcurrentDictionary (); because this says that...
Multiple thread access to a static object of a non-static class By default non-static methods have their own instance of variables for each thread when accessed via multiple threads, thus rendering them thread safe if they do not include a public variable etc. On the other hand, variables in static methods are shared a...
TITLE: Multiple thread access to a static object of a non-static class QUESTION: By default non-static methods have their own instance of variables for each thread when accessed via multiple threads, thus rendering them thread safe if they do not include a public variable etc. On the other hand, variables in static me...
[ "c#", "multithreading", "thread-safety", "concurrentdictionary" ]
2
8
3,243
3
0
2011-06-03T09:29:26.387000
2011-06-03T09:40:05.387000
6,225,284
6,225,443
CSS Transparent Border Problem In Firefox 4?
I'm trying to create a pure CSS triangle for a tooltip. All browsers looks fine except for the latest Firefox 4. Here's the code: Untitled Document Firefox 4 Screenshot: Other Browsers Screenshot: As you can see in Firefox 4, it has something like a border. Is it a Firefox bug or this is really the behavior? How can I ...
if transparent is not work for you then use rgba may be that's work. Write:.arrow { border-color:#eee rgba(255,255,255,0) rgba(255,255,255,0) rgba(255,255,255,0); }
CSS Transparent Border Problem In Firefox 4? I'm trying to create a pure CSS triangle for a tooltip. All browsers looks fine except for the latest Firefox 4. Here's the code: Untitled Document Firefox 4 Screenshot: Other Browsers Screenshot: As you can see in Firefox 4, it has something like a border. Is it a Firefox b...
TITLE: CSS Transparent Border Problem In Firefox 4? QUESTION: I'm trying to create a pure CSS triangle for a tooltip. All browsers looks fine except for the latest Firefox 4. Here's the code: Untitled Document Firefox 4 Screenshot: Other Browsers Screenshot: As you can see in Firefox 4, it has something like a border....
[ "css", "transparent", "firefox4" ]
16
24
6,097
2
0
2011-06-03T09:29:38.100000
2011-06-03T09:44:44.903000
6,225,291
6,225,924
Delete all text in line before/after highlighted search pattern
I know in VIM how to search a string and delete the text till the start/end of line but I would like to know if it is also possible to delete all text in line before or after highlighted search pattern.
If you want to do this across all lines and don't want to retype your search term I'd suggest the following::%s/.*\ze /// What this does is: %s/: substitute across all lines in a file.*: match any character \ze: end matching so the rest of the pattern is not substituted /: insert text from the '/' register (which is th...
Delete all text in line before/after highlighted search pattern I know in VIM how to search a string and delete the text till the start/end of line but I would like to know if it is also possible to delete all text in line before or after highlighted search pattern.
TITLE: Delete all text in line before/after highlighted search pattern QUESTION: I know in VIM how to search a string and delete the text till the start/end of line but I would like to know if it is also possible to delete all text in line before or after highlighted search pattern. ANSWER: If you want to do this acr...
[ "search", "vim" ]
13
14
34,265
5
0
2011-06-03T09:30:21.017000
2011-06-03T10:31:15.917000
6,225,293
6,225,317
String manipulation, removing a tag
I have the following loop which generates a little snippet of html: for (var i = 0; i < 5; i++) { test_html += 'some text here '; } this will create the html some text here some text here some text here some text here some text here How do I stop the last from being added, or how do I remove the last?
I'd just use an array. var test_html = []; for (var i = 0; i < 5; i++) { test_html.push('some text here'); } console.log(test_html.join(' ')) Also, if you want to join only strings, just loop one less var test_html = ''; for (var i = 0; i < 4; i++) { //4 not 5 test_html += 'some text here '; } test_html += 'some text h...
String manipulation, removing a tag I have the following loop which generates a little snippet of html: for (var i = 0; i < 5; i++) { test_html += 'some text here '; } this will create the html some text here some text here some text here some text here some text here How do I stop the last from being added, or how do ...
TITLE: String manipulation, removing a tag QUESTION: I have the following loop which generates a little snippet of html: for (var i = 0; i < 5; i++) { test_html += 'some text here '; } this will create the html some text here some text here some text here some text here some text here How do I stop the last from being...
[ "javascript", "string" ]
0
7
127
8
0
2011-06-03T09:31:01.223000
2011-06-03T09:33:29.850000
6,225,303
6,241,005
Can't connect to SQL Azure from app, but can from SSMS
I have a SQL Azure instance set up and can connect to it with no issue from SQL Server Management Studio. However when my app tries to connect, this error occurs: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify t...
I ramped up debugging within the DomainContext: DbContext class and found that the connection string always pointed to SQL Express even though there were all those entries in web.config pointing elsewhere. Then I realised that the problem was the parameter passed to the base class in the constructor. Somewhere along th...
Can't connect to SQL Azure from app, but can from SSMS I have a SQL Azure instance set up and can connect to it with no issue from SQL Server Management Studio. However when my app tries to connect, this error occurs: A network-related or instance-specific error occurred while establishing a connection to SQL Server. T...
TITLE: Can't connect to SQL Azure from app, but can from SSMS QUESTION: I have a SQL Azure instance set up and can connect to it with no issue from SQL Server Management Studio. However when my app tries to connect, this error occurs: A network-related or instance-specific error occurred while establishing a connectio...
[ "asp.net-mvc", "entity-framework", "azure", "connection-string", "azure-sql-database" ]
10
2
2,618
3
0
2011-06-03T09:31:58.277000
2011-06-05T04:26:35.197000
6,225,308
6,226,659
Get related youtube videos by a certain uploader
For a youtube brand channel I need to find related videos only from the owner of that channel. I use the Zend_Gdata_YouTube class. To search for videos by category or keywords I'am using the function getVideoFeed: $this->yt->getVideoFeed('http://gdata.youtube.com/feeds/api/users/'.self::UPLOADER.'/uploads?category='. $...
well, the answer is a mix of all parts I already used and tried: $query = $this->yt->newVideoQuery(); $query->setFeedType('related', $videoId); $query->setMaxResults(4); $query->setAuthor(self::UPLOADER); $feed = $this->yt->getVideoFeed($query); the direct API call would be: $url = 'http://gdata.youtube.com/feeds/api...
Get related youtube videos by a certain uploader For a youtube brand channel I need to find related videos only from the owner of that channel. I use the Zend_Gdata_YouTube class. To search for videos by category or keywords I'am using the function getVideoFeed: $this->yt->getVideoFeed('http://gdata.youtube.com/feeds/a...
TITLE: Get related youtube videos by a certain uploader QUESTION: For a youtube brand channel I need to find related videos only from the owner of that channel. I use the Zend_Gdata_YouTube class. To search for videos by category or keywords I'am using the function getVideoFeed: $this->yt->getVideoFeed('http://gdata.y...
[ "php", "youtube-api", "zend-gdata" ]
2
0
969
2
0
2011-06-03T09:32:37.713000
2011-06-03T11:42:09.403000
6,225,309
6,225,453
Adding hundreds of pushpins programatically to bing maps freezes the WP7 UI
I'm working on a WP7 app that uses bing maps to display ~600 pushpins. When i add them to the map using map.Children.Add(pushpin) the UI freezes for ~200 ms. I've seen that in silverlight you can use Microsoft.Maps.EntityCollection to add pins to a map but unfortunately I couldn't find how to use the assembly on WP7. D...
Maybe you're looking at the problem the wrong way round. WP7 is a compact (though powerful) that excels at showing the user what they want to know quickly (when the apps are written properly). The user can't possibly see 600 pushpins in one go on a device that small, so why not just show them pushpins that are in the v...
Adding hundreds of pushpins programatically to bing maps freezes the WP7 UI I'm working on a WP7 app that uses bing maps to display ~600 pushpins. When i add them to the map using map.Children.Add(pushpin) the UI freezes for ~200 ms. I've seen that in silverlight you can use Microsoft.Maps.EntityCollection to add pins ...
TITLE: Adding hundreds of pushpins programatically to bing maps freezes the WP7 UI QUESTION: I'm working on a WP7 app that uses bing maps to display ~600 pushpins. When i add them to the map using map.Children.Add(pushpin) the UI freezes for ~200 ms. I've seen that in silverlight you can use Microsoft.Maps.EntityColle...
[ "silverlight", "windows-phone-7", "bing-maps", "pushpin" ]
3
10
1,471
2
0
2011-06-03T09:32:52.157000
2011-06-03T09:45:18.980000
6,225,318
6,225,501
Broadcast Windows HWND_BROADCAST message
I am working in an application in this application I shall wait for some event in application 1 and when this event happen I shall sendmessage to application 2 which will perform something. First API declaration private const int HWND_BROADCAST = 0xffff; [DllImport("user32.dll", SetLastError = true, CharSet = CharSet....
HWND_BROADCAST is pretty dangerous.. I know it's highly unlikely but what if another application also handled your message?? Anyway, that aside, have you taken a read of http://msdn.microsoft.com/en-us/library/ms644953.aspx The most basic way to debug an issue with your code (as it's WINAPI based) would be to use GetLa...
Broadcast Windows HWND_BROADCAST message I am working in an application in this application I shall wait for some event in application 1 and when this event happen I shall sendmessage to application 2 which will perform something. First API declaration private const int HWND_BROADCAST = 0xffff; [DllImport("user32.dll"...
TITLE: Broadcast Windows HWND_BROADCAST message QUESTION: I am working in an application in this application I shall wait for some event in application 1 and when this event happen I shall sendmessage to application 2 which will perform something. First API declaration private const int HWND_BROADCAST = 0xffff; [DllI...
[ "c#", "winapi", "ipc" ]
3
3
12,076
3
0
2011-06-03T09:33:38.283000
2011-06-03T09:49:27.030000
6,225,326
6,225,352
Game Kit Send data to offline player
I am pretty sure i know the answer but is it possible to send data using game kit to a player who is not playing the game anymore so next time he loads the game the data will be there. Is there any sort of messaging queue in gamecenter that can hold data
Nope, this is not possible if you let Game Center host the game. But you can set up your own server which stores the data and hands it over to the client while still having Game Centers match making functionality.
Game Kit Send data to offline player I am pretty sure i know the answer but is it possible to send data using game kit to a player who is not playing the game anymore so next time he loads the game the data will be there. Is there any sort of messaging queue in gamecenter that can hold data
TITLE: Game Kit Send data to offline player QUESTION: I am pretty sure i know the answer but is it possible to send data using game kit to a player who is not playing the game anymore so next time he loads the game the data will be there. Is there any sort of messaging queue in gamecenter that can hold data ANSWER: N...
[ "ios", "gamekit", "game-center" ]
0
1
284
1
0
2011-06-03T09:34:04.553000
2011-06-03T09:36:17.890000
6,225,332
6,225,457
Zoom support while page curling effect present in pdf reader app
Hi I am developing an ipad Magazine app where I need to display pdf files.I am using leaves project for page curl effect.This works great. But in landscape page fits to height(768px) and it becomes difficult to read the font. Thats why I want to support zoom in/out on this view. I am a newbie to Core Graphics.I think i...
You can refer this tutorial. Provided by APPLE Hope it helps.
Zoom support while page curling effect present in pdf reader app Hi I am developing an ipad Magazine app where I need to display pdf files.I am using leaves project for page curl effect.This works great. But in landscape page fits to height(768px) and it becomes difficult to read the font. Thats why I want to support z...
TITLE: Zoom support while page curling effect present in pdf reader app QUESTION: Hi I am developing an ipad Magazine app where I need to display pdf files.I am using leaves project for page curl effect.This works great. But in landscape page fits to height(768px) and it becomes difficult to read the font. Thats why I...
[ "iphone", "ipad", "pdf", "cgpdfdocument", "uiviewanimationtransition" ]
1
3
1,674
2
0
2011-06-03T09:34:28.013000
2011-06-03T09:45:31.977000
6,225,343
6,225,883
Is there a helper method to parse an appSettings-like xml?
By appSettings-like I mean like this, The result is a key-value collection that I can access like: string v = config["myKey"]; but it is not necessarily located in app.config, so what I have is a string or a XmlNode. NameValueFileSectionHandler.Create method apparently can do the job, but the input needs two objects, O...
Parse a string to a dictionary like this, var xml = XElement.Parse(" "); var dic = xml.Descendants("add").ToDictionary(x => x.Attribute("key").Value, x => x.Attribute("value").Value); You can get the values like this, var item = dic["myKey"]; You can also modify the values in the dictionary like this, dic["myKey"] = "n...
Is there a helper method to parse an appSettings-like xml? By appSettings-like I mean like this, The result is a key-value collection that I can access like: string v = config["myKey"]; but it is not necessarily located in app.config, so what I have is a string or a XmlNode. NameValueFileSectionHandler.Create method ap...
TITLE: Is there a helper method to parse an appSettings-like xml? QUESTION: By appSettings-like I mean like this, The result is a key-value collection that I can access like: string v = config["myKey"]; but it is not necessarily located in app.config, so what I have is a string or a XmlNode. NameValueFileSectionHandle...
[ "c#", ".net", "xml", "app-config" ]
5
7
2,872
4
0
2011-06-03T09:35:07.857000
2011-06-03T10:26:59.597000
6,225,351
6,225,706
How to minify php page html output?
I am looking for a php script or class that can minify my php page html output like google page speed does. How can I do this?
CSS and Javascript Consider the following link to minify Javascript/CSS files: https://github.com/mrclay/minify HTML Tell Apache to deliver HTML with GZip - this generally reduces the response size by about 70%. (If you use Apache, the module configuring gzip depends on your version: Apache 1.3 uses mod_gzip while Apac...
How to minify php page html output? I am looking for a php script or class that can minify my php page html output like google page speed does. How can I do this?
TITLE: How to minify php page html output? QUESTION: I am looking for a php script or class that can minify my php page html output like google page speed does. How can I do this? ANSWER: CSS and Javascript Consider the following link to minify Javascript/CSS files: https://github.com/mrclay/minify HTML Tell Apache t...
[ "php", "html", "minify" ]
158
237
202,010
15
0
2011-06-03T09:36:07.233000
2011-06-03T10:10:39.740000
6,225,363
6,225,470
Parse and create message from config file/database/property file at run time
In my application perticular message structure/format are send and received. When I have to send the message, the message should be created on the particular format. I have parse message on perticular message. The message nothing but byte array To parse the message I have used Preon lib. I have following problem with: ...
I would use an OSGi container (karaf/iPOJO) which allows me to change the code while the application is running. This means you can add fields, change their type and size while the system without bringing down the application. Note: if you add a field or make a field larger but the code doesn't support it won't you los...
Parse and create message from config file/database/property file at run time In my application perticular message structure/format are send and received. When I have to send the message, the message should be created on the particular format. I have parse message on perticular message. The message nothing but byte arra...
TITLE: Parse and create message from config file/database/property file at run time QUESTION: In my application perticular message structure/format are send and received. When I have to send the message, the message should be created on the particular format. I have parse message on perticular message. The message not...
[ "java" ]
0
1
133
1
0
2011-06-03T09:37:34.397000
2011-06-03T09:46:30.677000
6,225,371
6,225,949
Load local xml file using javascript in Google Chrome
I think until v5 of Google Chrome the below code worked. Now in the latest version I get the following error when opening my webpage locally: "XMLHttpRequest cannot load file:///C:/Temp/Course.xml. Cross origin requests are only supported for HTTP." The Javascript code: function getXmlDocument(sFile) { var xmlHttp, oXM...
Local file access is disabled by default for security reasons. Try starting Google Chrome from the command line with the argument --allow-file-access
Load local xml file using javascript in Google Chrome I think until v5 of Google Chrome the below code worked. Now in the latest version I get the following error when opening my webpage locally: "XMLHttpRequest cannot load file:///C:/Temp/Course.xml. Cross origin requests are only supported for HTTP." The Javascript c...
TITLE: Load local xml file using javascript in Google Chrome QUESTION: I think until v5 of Google Chrome the below code worked. Now in the latest version I get the following error when opening my webpage locally: "XMLHttpRequest cannot load file:///C:/Temp/Course.xml. Cross origin requests are only supported for HTTP....
[ "javascript", "xml", "google-chrome" ]
4
6
13,813
2
0
2011-06-03T09:38:21.553000
2011-06-03T10:33:05.263000
6,225,375
6,225,874
Idiomatic use of std::rel_ops
What is the preferred method of using std::rel_ops to add the full set of relational operators to a class? This documentation suggests a using namespace std::rel_ops, but this seems to be deeply flawed, as it would mean that including the header for the class implemented in this way would also add full relational opera...
I think that the preferred technique is not to use std::rel_ops at all. The technique used in boost::operator ( link ) seems to be the usual solution. Example: #include "boost/operators.hpp" class SomeClass: private boost::equivalent, boost::totally_ordered { public: bool operator<(const SomeClass &rhs) const { return...
Idiomatic use of std::rel_ops What is the preferred method of using std::rel_ops to add the full set of relational operators to a class? This documentation suggests a using namespace std::rel_ops, but this seems to be deeply flawed, as it would mean that including the header for the class implemented in this way would ...
TITLE: Idiomatic use of std::rel_ops QUESTION: What is the preferred method of using std::rel_ops to add the full set of relational operators to a class? This documentation suggests a using namespace std::rel_ops, but this seems to be deeply flawed, as it would mean that including the header for the class implemented ...
[ "c++", "std", "idioms" ]
49
25
5,502
4
0
2011-06-03T09:38:57.877000
2011-06-03T10:26:21.127000
6,225,376
6,226,360
How to call "QList<QVariant> QVariant::toList () const"
This is a pretty simple and probably dumb question, but I have forgotten how to use QList QVariant::toList () const QVariant s = this->page()->mainFrame()->evaluateJavaScript (QString ("Open(%1,%2)").arg (point.x()).arg (point.y())); List x; x = s.toList (); Of course this is wrong, what is the correct way out?:redfac...
What you do is almost correct: QList x = s.toList(); (Note the use of QList instead of List.)
How to call "QList<QVariant> QVariant::toList () const" This is a pretty simple and probably dumb question, but I have forgotten how to use QList QVariant::toList () const QVariant s = this->page()->mainFrame()->evaluateJavaScript (QString ("Open(%1,%2)").arg (point.x()).arg (point.y())); List x; x = s.toList (); Of c...
TITLE: How to call "QList<QVariant> QVariant::toList () const" QUESTION: This is a pretty simple and probably dumb question, but I have forgotten how to use QList QVariant::toList () const QVariant s = this->page()->mainFrame()->evaluateJavaScript (QString ("Open(%1,%2)").arg (point.x()).arg (point.y())); List x; x =...
[ "qt", "templates", "qvariant" ]
0
2
3,609
2
0
2011-06-03T09:39:05.077000
2011-06-03T11:12:10.947000
6,225,384
6,225,896
Save Live Video Stream To Local Storage
Problem: I have to save live video streams data which come as an RTP packets from RTSP Server. The data come in two formats: MPEG4 and h264. I do not want to encode/decode input stream. Just write to a file which is playable with proper codecs. Any advice? Best Wishes History: My Solutions and their problems: Firt atte...
The MP4 file format has an index that is required for correct playback, and the index can only be created once you've finished recording. So any solution using MP4 container files (and other indexed files) is going to suffer from the same problem. You need to stop the recording to finalise the file, or it will not be p...
Save Live Video Stream To Local Storage Problem: I have to save live video streams data which come as an RTP packets from RTSP Server. The data come in two formats: MPEG4 and h264. I do not want to encode/decode input stream. Just write to a file which is playable with proper codecs. Any advice? Best Wishes History: My...
TITLE: Save Live Video Stream To Local Storage QUESTION: Problem: I have to save live video streams data which come as an RTP packets from RTSP Server. The data come in two formats: MPEG4 and h264. I do not want to encode/decode input stream. Just write to a file which is playable with proper codecs. Any advice? Best ...
[ "ffmpeg", "directshow", "rtsp" ]
0
2
2,844
1
0
2011-06-03T09:39:25.470000
2011-06-03T10:28:24.373000
6,225,387
6,225,445
iOS Touch, Gestures, Animation
I am exploring iOS4.3 SDK & wanted to implement a particular animation effect. But have no idea how to do it. It goes like this - I have a square box on the screen & upon user putting his finger on the box & dragging his finger the box should follow him. It's easy till here. I was able to implement it like so - -(void)...
Why don't you consider using UIPanGestureRecognizer. You can use the translationInView: to move the box as moves the finger across. And when the gesture's state is UIGestureRecognizerStateEnded, you could use velocityInView: to get the desired follow up effect.
iOS Touch, Gestures, Animation I am exploring iOS4.3 SDK & wanted to implement a particular animation effect. But have no idea how to do it. It goes like this - I have a square box on the screen & upon user putting his finger on the box & dragging his finger the box should follow him. It's easy till here. I was able to...
TITLE: iOS Touch, Gestures, Animation QUESTION: I am exploring iOS4.3 SDK & wanted to implement a particular animation effect. But have no idea how to do it. It goes like this - I have a square box on the screen & upon user putting his finger on the box & dragging his finger the box should follow him. It's easy till h...
[ "objective-c", "ios", "animation", "core-animation" ]
1
2
3,159
2
0
2011-06-03T09:39:42.130000
2011-06-03T09:44:54.123000
6,225,390
6,225,504
PIRCBOT - How to add voice to all users in the channel - Java
I'm using the pircbot to make an IRC bot. How do I make the bot add voice to all the users in the channel? Or when the users join?
Probably something like this: import org.jibble.pircbot.*; public class MyBot extends PircBot { public MyBot() { this.setName("MyBot"); } public void onJoin(String channel, String sender, String login, String hostname, String message) { this.voice(channel, sender); } public void voiceAll(String channel) { int i = 0...
PIRCBOT - How to add voice to all users in the channel - Java I'm using the pircbot to make an IRC bot. How do I make the bot add voice to all the users in the channel? Or when the users join?
TITLE: PIRCBOT - How to add voice to all users in the channel - Java QUESTION: I'm using the pircbot to make an IRC bot. How do I make the bot add voice to all the users in the channel? Or when the users join? ANSWER: Probably something like this: import org.jibble.pircbot.*; public class MyBot extends PircBot { pu...
[ "java", "irc" ]
0
0
1,049
1
0
2011-06-03T09:39:58.213000
2011-06-03T09:50:07.450000
6,225,392
6,225,414
How to get first two characters of a string in oracle query?
Suppose I have a column name OrderNo with value AO025631 in a table shipment. I am trying to query the table so that I can get only first two character of column value i.e. AO. Can I do this in the SQL query itself?
SUBSTR (documentation): SELECT SUBSTR(OrderNo, 1, 2) As NewColumnName from shipment When selected, it's like any other column. You should give it a name (with As keyword), and you can selected other columns in the same statement: SELECT SUBSTR(OrderNo, 1, 2) As NewColumnName, column2,... from shipment
How to get first two characters of a string in oracle query? Suppose I have a column name OrderNo with value AO025631 in a table shipment. I am trying to query the table so that I can get only first two character of column value i.e. AO. Can I do this in the SQL query itself?
TITLE: How to get first two characters of a string in oracle query? QUESTION: Suppose I have a column name OrderNo with value AO025631 in a table shipment. I am trying to query the table so that I can get only first two character of column value i.e. AO. Can I do this in the SQL query itself? ANSWER: SUBSTR (document...
[ "sql", "oracle" ]
66
109
363,947
6
0
2011-06-03T09:40:00.930000
2011-06-03T09:42:19.977000
6,225,398
6,225,642
Resize NSWindows with easing animation
I'm trying to resize an NSWindow (the main one) with a nice easing animation (EaseOut). I can use the [NSWindow animator] but I havn't found a way to add the easing effect. Do you have an idea or code sample which can help me to do that?
Option 1 float Y = 100; float X = 200; NSRect frame = [window frame]; frame.origin.y -= Y; frame.size.height += Y; frame.size.width += X; [window setFrame:frame display:YES animate:YES]; Option 2 float Y = 100; float X = 200; NSRect frame = [window frame]; frame.origin.y -= Y; frame.size.height += Y; frame.size.wi...
Resize NSWindows with easing animation I'm trying to resize an NSWindow (the main one) with a nice easing animation (EaseOut). I can use the [NSWindow animator] but I havn't found a way to add the easing effect. Do you have an idea or code sample which can help me to do that?
TITLE: Resize NSWindows with easing animation QUESTION: I'm trying to resize an NSWindow (the main one) with a nice easing animation (EaseOut). I can use the [NSWindow animator] but I havn't found a way to add the easing effect. Do you have an idea or code sample which can help me to do that? ANSWER: Option 1 float Y...
[ "cocoa", "core-animation", "nswindow" ]
17
38
8,999
2
0
2011-06-03T09:40:20.940000
2011-06-03T10:05:36.027000
6,225,400
6,240,945
Problem posting to datastore with deferred.defer tasks
I am trying to do this on Google App Engine in Python: def add_to_db(person): a = PersonDb(key_name = person) # get some data data1 = a.name data2 = a.age a.put() for person in people: deferred.defer(add_to_db, person, _queue="myque") When I run the above code via a cron job it does not work. The file executes without...
This is probably happening because the function you are trying to defer ( add_to_db ) is defined in the request handler. Move add_to_db to another module (a different python file) and import it from there ( from myfuncs import add_to_db ). This limitation is mentioned in the limitations section of the deferred article.
Problem posting to datastore with deferred.defer tasks I am trying to do this on Google App Engine in Python: def add_to_db(person): a = PersonDb(key_name = person) # get some data data1 = a.name data2 = a.age a.put() for person in people: deferred.defer(add_to_db, person, _queue="myque") When I run the above code via...
TITLE: Problem posting to datastore with deferred.defer tasks QUESTION: I am trying to do this on Google App Engine in Python: def add_to_db(person): a = PersonDb(key_name = person) # get some data data1 = a.name data2 = a.age a.put() for person in people: deferred.defer(add_to_db, person, _queue="myque") When I run ...
[ "python", "google-app-engine", "scheduled-tasks", "datastore", "deferred" ]
1
2
458
1
0
2011-06-03T09:40:43.357000
2011-06-05T04:07:20.347000
6,225,409
6,226,773
How to override Text of label component in jsp?
I am trying to change the label text of a jsp page after it is redirected from a servlet. I used the below code but it doesn't work: response.sendRedirect("Welcome.jsp?user=Data Stored Successfully"); Should I use a Session instead or it can be done in other way? Actually the static text on label of jsp page is printed...
I have no idea what you're talking about with "text of label component", so I'll just assume a HTML element. Basically, you can display request parameters in EL as follows: ${param.name} This does effectively the same as out.print(request.getParameter("name")). So, if you want to display "text of label component" dynam...
How to override Text of label component in jsp? I am trying to change the label text of a jsp page after it is redirected from a servlet. I used the below code but it doesn't work: response.sendRedirect("Welcome.jsp?user=Data Stored Successfully"); Should I use a Session instead or it can be done in other way? Actually...
TITLE: How to override Text of label component in jsp? QUESTION: I am trying to change the label text of a jsp page after it is redirected from a servlet. I used the below code but it doesn't work: response.sendRedirect("Welcome.jsp?user=Data Stored Successfully"); Should I use a Session instead or it can be done in o...
[ "jsp", "servlets" ]
0
0
2,536
1
0
2011-06-03T09:41:50.900000
2011-06-03T11:53:14.067000
6,225,417
6,225,544
CAML Query string beings with any number
Is there an easy way to return all strings that begin with a number in a CAML query?
Is this a one-time query or do you want to implement it somehow? If onetime, then you can use this query: 0 1 2 3 4 5 6 7 8 9 Another way is to fetch all items, use SPListItemCollection. GetDataTable() method to return datatable, and filter your records there. If List will contain many items, this way is not recommende...
CAML Query string beings with any number Is there an easy way to return all strings that begin with a number in a CAML query?
TITLE: CAML Query string beings with any number QUESTION: Is there an easy way to return all strings that begin with a number in a CAML query? ANSWER: Is this a one-time query or do you want to implement it somehow? If onetime, then you can use this query: 0 1 2 3 4 5 6 7 8 9 Another way is to fetch all items, use SP...
[ "sharepoint", "sharepoint-2010", "sharepoint-2007", "caml" ]
0
4
2,230
1
0
2011-06-03T09:42:32.440000
2011-06-03T09:54:07.757000
6,225,426
6,240,839
Does Mercurial do a better job merging files when changesets are small?
Let's say I have a development branch for some feature called "myDevelopmentBranch" and another branch "myOtherBranch" containing quite a lot of changes, some of will conflict with stuff from "myDevelopmentBranch". Will (potentially) the result of a merge from "myDevelopmentBranch" to "myOtherBranch" be different if I ...
The merge resolves differences between the changed files as they stand at the tip of both branches (assuming you are merging the tips). So if you had... 1 changeset A1 on branch A that changes 500 lines, parent changeset Z 1 changeset B1 on branch B that changes 500 lines, parent changeset Z...you would have the same m...
Does Mercurial do a better job merging files when changesets are small? Let's say I have a development branch for some feature called "myDevelopmentBranch" and another branch "myOtherBranch" containing quite a lot of changes, some of will conflict with stuff from "myDevelopmentBranch". Will (potentially) the result of ...
TITLE: Does Mercurial do a better job merging files when changesets are small? QUESTION: Let's say I have a development branch for some feature called "myDevelopmentBranch" and another branch "myOtherBranch" containing quite a lot of changes, some of will conflict with stuff from "myDevelopmentBranch". Will (potential...
[ "mercurial", "merge", "dvcs" ]
5
5
114
1
0
2011-06-03T09:43:14.797000
2011-06-05T03:31:22.517000
6,225,428
6,225,697
How to set 2 functions with BeforeShowDay on jQuery Datepicker?
I have a date picker and i need to set to functions to run on BeforeShowDay. I can't work out how to run both functions names unavailable and disabledays http://jsfiddle.net/rLnTQ/50/ Thanks in advance Lee
How about combining them into one? function disabledays(date) { dmy = date.getDate() + "-" + (date.getMonth() + 1) + "-" + date.getFullYear(); if ($.inArray(dmy, unavailableDates) == 0) { return [false, "", "Unavailable"] } else { var day = date.getDay(); return [(day!= 0 && day!= 2)]; } } $('#txtDate').datepicker({ be...
How to set 2 functions with BeforeShowDay on jQuery Datepicker? I have a date picker and i need to set to functions to run on BeforeShowDay. I can't work out how to run both functions names unavailable and disabledays http://jsfiddle.net/rLnTQ/50/ Thanks in advance Lee
TITLE: How to set 2 functions with BeforeShowDay on jQuery Datepicker? QUESTION: I have a date picker and i need to set to functions to run on BeforeShowDay. I can't work out how to run both functions names unavailable and disabledays http://jsfiddle.net/rLnTQ/50/ Thanks in advance Lee ANSWER: How about combining the...
[ "javascript", "jquery", "datepicker" ]
0
7
7,682
1
0
2011-06-03T09:43:23.077000
2011-06-03T10:10:00.090000
6,225,434
6,225,472
Objective C initWithNibName
I am facing some difficulties figuring out what this function in the Apple tutorials stands for: [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:[NSBundle mainBundle]] My questions are: what does the "@" stand for before MyViewController? Addionally, as I am following this tutorial, I was wondering...
The @-sign before a string literal means that the string is an instance of NSString. @"Hello" <-- NSString object "Hello" <-- Null-terminated char array (C-string) You can even send messages to it: [@"Hello" stringByAppendingString:@" World!"] You will use NSString objects more often than C-strings. If you want to conv...
Objective C initWithNibName I am facing some difficulties figuring out what this function in the Apple tutorials stands for: [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:[NSBundle mainBundle]] My questions are: what does the "@" stand for before MyViewController? Addionally, as I am following th...
TITLE: Objective C initWithNibName QUESTION: I am facing some difficulties figuring out what this function in the Apple tutorials stands for: [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:[NSBundle mainBundle]] My questions are: what does the "@" stand for before MyViewController? Addionally, as...
[ "objective-c", "ios", "string", "nib", "init" ]
1
2
4,265
1
0
2011-06-03T09:43:59.773000
2011-06-03T09:46:43.270000
6,225,441
6,225,525
asp.net jquery ajax - static web method problem
I have a asp.net webmethod which is static and it will do delete operation of user's files in the DB. The file_name is sent through jQuery as input. But the for DB connection, I need to use a static DBconnection object. When multiple users delete their own file from UI, the jQuery will hit the same static method, which...
Obviously, if you share the DB connection between multiple requests simultaneously there's not telling what will happen. This is per definition undefined. What you need to do is that either isolate the thing (make it non-static) or introduce a lock that will force incoming requests to wait indefinitely (until the opera...
asp.net jquery ajax - static web method problem I have a asp.net webmethod which is static and it will do delete operation of user's files in the DB. The file_name is sent through jQuery as input. But the for DB connection, I need to use a static DBconnection object. When multiple users delete their own file from UI, t...
TITLE: asp.net jquery ajax - static web method problem QUESTION: I have a asp.net webmethod which is static and it will do delete operation of user's files in the DB. The file_name is sent through jQuery as input. But the for DB connection, I need to use a static DBconnection object. When multiple users delete their o...
[ "jquery", "asp.net", "ajax" ]
0
1
3,575
2
0
2011-06-03T09:44:32.613000
2011-06-03T09:52:01.990000
6,225,456
6,225,855
Using ScaLAPACK routine from MPI C program
I currently have an MPI program written in C and I want to use a routine from ScaLAPACK. I'm working on a parallel version of LDA, and one step is inverting a matrix. I found a routine in ScaLAPACK that solves this pdgetri.f (it's written in fortran, I'm not sure that a c routine exists), but I'm not sure how to config...
SCALAPACK relies on BLACS to provide abstraction to whatever message passing system is in use. If you have an existing MPI communicator established in your code, you can use blacs_gridmap to initialise a BLACS context which is mapped onto your communicator. That context can then be used to create SCALAPACK distributed ...
Using ScaLAPACK routine from MPI C program I currently have an MPI program written in C and I want to use a routine from ScaLAPACK. I'm working on a parallel version of LDA, and one step is inverting a matrix. I found a routine in ScaLAPACK that solves this pdgetri.f (it's written in fortran, I'm not sure that a c rout...
TITLE: Using ScaLAPACK routine from MPI C program QUESTION: I currently have an MPI program written in C and I want to use a routine from ScaLAPACK. I'm working on a parallel version of LDA, and one step is inverting a matrix. I found a routine in ScaLAPACK that solves this pdgetri.f (it's written in fortran, I'm not ...
[ "mpi" ]
3
1
1,906
1
0
2011-06-03T09:45:24.543000
2011-06-03T10:24:23.527000
6,225,464
6,225,557
"Define" Macro Concatenation and _TEXT
is there any way of concatenation #define macros in c++ (ms compiler)? I have existing code like this: #define LOG_FILENAME _TEXT("VendorBlaBlaDriver.log") #define REGISTRY_FILENAME _TEXT("VendorBlaBlaDriver") #define VENDOR_NAME _TEXT("VendorBlaBla") I wanna do the following: #define NAME_PART1 "VenorBlaBla" #define N...
You can't apply the _TEXT macro twice. or on multiple strings, but you can concatenate the results. I.e. #define LOG_FILENAME _TEXT(NAME_PART1) _TEXT(NAME_PART2) _TEXT(".log") However, you really shouldn't bother. The _TEXT macro was used around the turn of the century, when there were still non-Unicode platforms aroun...
"Define" Macro Concatenation and _TEXT is there any way of concatenation #define macros in c++ (ms compiler)? I have existing code like this: #define LOG_FILENAME _TEXT("VendorBlaBlaDriver.log") #define REGISTRY_FILENAME _TEXT("VendorBlaBlaDriver") #define VENDOR_NAME _TEXT("VendorBlaBla") I wanna do the following: #de...
TITLE: "Define" Macro Concatenation and _TEXT QUESTION: is there any way of concatenation #define macros in c++ (ms compiler)? I have existing code like this: #define LOG_FILENAME _TEXT("VendorBlaBlaDriver.log") #define REGISTRY_FILENAME _TEXT("VendorBlaBlaDriver") #define VENDOR_NAME _TEXT("VendorBlaBla") I wanna do ...
[ "c++" ]
0
3
1,076
3
0
2011-06-03T09:45:57.213000
2011-06-03T09:55:33.187000
6,225,468
6,225,754
All possible model validation errors
I have got a form with a bunch of fields and model validations. How can I return all possible validation errors that can be raised? I need it to write locales for all of them. I want to get a list like this: password blank password too_short password confirmation login blank login invalid email blank email too_short em...
Basically what Pablo says, except that the page on the rails docs doesn't show how to override the messages for a particular model and field. here's an example from one of my apps: activerecord: errors: full_messages: format: "{{message}}" #define standard error messages, which we can overide on per model/per attribute...
All possible model validation errors I have got a form with a bunch of fields and model validations. How can I return all possible validation errors that can be raised? I need it to write locales for all of them. I want to get a list like this: password blank password too_short password confirmation login blank login i...
TITLE: All possible model validation errors QUESTION: I have got a form with a bunch of fields and model validations. How can I return all possible validation errors that can be raised? I need it to write locales for all of them. I want to get a list like this: password blank password too_short password confirmation l...
[ "ruby-on-rails", "ruby", "validation", "forms" ]
8
13
3,021
2
0
2011-06-03T09:46:19.430000
2011-06-03T10:15:05.847000
6,225,469
6,225,950
GCC inline assembly error: block assembly operand not recognized
I've got yet another error trying to compile with Apple GCC 4.2.1 using the -fasm-blocks argument (which enables Intel style assembly syntax) inline assembly code which worked in MSVC: block assembly operand not recognized, label 'LASM$TYPE' used but not defined: typedef struct _MyStruct { int data; //... }MyStruct; v...
TYPE is an MSVC-specific asm keyword. Here it just means sizeof. I tried to find some gcc asm-block documentation on the web, but I gave up after ten minutes. Try add edi,sizeof(MyStruct) and variants. I don't have an Apple, so I can't try it out for you. Updated to answer question in comment: Try this: add edi,__offse...
GCC inline assembly error: block assembly operand not recognized I've got yet another error trying to compile with Apple GCC 4.2.1 using the -fasm-blocks argument (which enables Intel style assembly syntax) inline assembly code which worked in MSVC: block assembly operand not recognized, label 'LASM$TYPE' used but not ...
TITLE: GCC inline assembly error: block assembly operand not recognized QUESTION: I've got yet another error trying to compile with Apple GCC 4.2.1 using the -fasm-blocks argument (which enables Intel style assembly syntax) inline assembly code which worked in MSVC: block assembly operand not recognized, label 'LASM$T...
[ "c++", "visual-c++", "gcc", "assembly", "inline-assembly" ]
2
1
664
1
0
2011-06-03T09:46:22.063000
2011-06-03T10:33:11.170000
6,225,476
6,225,490
Structure a class inside a class?
Currently, if I have different classes containing functions etc, I would structure them all in the 1 VB file titled whatever the main Class is. For example: MainClass.vb: Class MainClass Function FunctionA() as String... End Function Class SubClass Function SubFunction() as String.... End Function Class SubSubClass...
At least C# understands " partial classes " where you can spread the code over multiple files (within the same assembly) EDIT I expected VB to have partial classes also (I only work in C# myself), but as noted in the comments, it does have them. In C# I could code something like this: File MainClass.cs: public partial ...
Structure a class inside a class? Currently, if I have different classes containing functions etc, I would structure them all in the 1 VB file titled whatever the main Class is. For example: MainClass.vb: Class MainClass Function FunctionA() as String... End Function Class SubClass Function SubFunction() as String.....
TITLE: Structure a class inside a class? QUESTION: Currently, if I have different classes containing functions etc, I would structure them all in the 1 VB file titled whatever the main Class is. For example: MainClass.vb: Class MainClass Function FunctionA() as String... End Function Class SubClass Function SubFunc...
[ "asp.net", "vb.net", "class" ]
1
3
2,138
3
0
2011-06-03T09:46:51.330000
2011-06-03T09:48:33.483000
6,225,483
6,226,580
From C ++ to Haskell Classes and States
I have to transform this C++ code class A { public: int x_A; void setX_A (int newx) { x_A = newx; } void printX_A() { printf("x_A is %d", x_A); } }; class B: public A { public: int x_B; void setX_B (int newx) { x_B = newx; } void printX_B() { printf("x_B is %d", x_B); } }; main() { A objA; B objB; objA.setX_A(2...
I think your problem is that you don't have a nice way to specify which object you are operating on. To solve the matter I propose using a separate program state, enclosing both of the objects: data MainState = MainState { objA:: FieldsA, objB:: FieldsB } Now your main function monad can look like this: type Main t = S...
From C ++ to Haskell Classes and States I have to transform this C++ code class A { public: int x_A; void setX_A (int newx) { x_A = newx; } void printX_A() { printf("x_A is %d", x_A); } }; class B: public A { public: int x_B; void setX_B (int newx) { x_B = newx; } void printX_B() { printf("x_B is %d", x_B); } };...
TITLE: From C ++ to Haskell Classes and States QUESTION: I have to transform this C++ code class A { public: int x_A; void setX_A (int newx) { x_A = newx; } void printX_A() { printf("x_A is %d", x_A); } }; class B: public A { public: int x_B; void setX_B (int newx) { x_B = newx; } void printX_B() { printf("x_B i...
[ "c++", "haskell", "monads" ]
13
8
687
2
0
2011-06-03T09:47:48.400000
2011-06-03T11:33:22.587000
6,225,485
6,225,514
ASP.NET MVC3: Image loading through controller
I tried using the answer from here, but it did not work. I have the following code: public ActionResult ShowImage() { using (FileStream stream = new FileStream(Path.Combine(Server.MapPath("/App_Data/UserUpload/asd.png")), FileMode.Open)) { FileStreamResult result = new FileStreamResult(stream, "image/png"); result.File...
Try like this: public ActionResult ShowImage() { var file = Server.MapPath("~/App_Data/UserUpload/asd.png"); return File(file, "image/png", Path.GetFileName(file)); } or if you want a separate filename: public ActionResult ShowImage() { var path = Server.MapPath("~/App_Data/UserUpload"); var file = "asd.png"; var fullP...
ASP.NET MVC3: Image loading through controller I tried using the answer from here, but it did not work. I have the following code: public ActionResult ShowImage() { using (FileStream stream = new FileStream(Path.Combine(Server.MapPath("/App_Data/UserUpload/asd.png")), FileMode.Open)) { FileStreamResult result = new Fil...
TITLE: ASP.NET MVC3: Image loading through controller QUESTION: I tried using the answer from here, but it did not work. I have the following code: public ActionResult ShowImage() { using (FileStream stream = new FileStream(Path.Combine(Server.MapPath("/App_Data/UserUpload/asd.png")), FileMode.Open)) { FileStreamResul...
[ "image", "asp.net-mvc-3", "controller" ]
7
9
7,285
1
0
2011-06-03T09:47:53.843000
2011-06-03T09:51:00.070000
6,225,492
6,225,539
changing tableCellHeight
Is there a way to change the UITableCell height when a button is pressed? I'm trying to make the tablecell height changed to follow the label height, let say if the word is too lengthy, and it take 20 lines, the tablecell height will be roughly 21 line height, and if I pressed a segmented button, it'll have 50 lines wo...
I think you could look into UITableViewDelegate and provide the method: – tableView:heightForRowAtIndexPath: UITableView calls this function each time that it has to redraw a row. So, if you set some internal variable of your UITableViewController when you click your button, and make heightForRowAtIndexPath: return the...
changing tableCellHeight Is there a way to change the UITableCell height when a button is pressed? I'm trying to make the tablecell height changed to follow the label height, let say if the word is too lengthy, and it take 20 lines, the tablecell height will be roughly 21 line height, and if I pressed a segmented butto...
TITLE: changing tableCellHeight QUESTION: Is there a way to change the UITableCell height when a button is pressed? I'm trying to make the tablecell height changed to follow the label height, let say if the word is too lengthy, and it take 20 lines, the tablecell height will be roughly 21 line height, and if I pressed...
[ "ios", "xcode4", "uitableview" ]
0
1
117
1
0
2011-06-03T09:48:46.277000
2011-06-03T09:53:40.127000
6,225,495
6,225,507
Problem in my javascript
The page URL has to change when the loadTest() function is called on a ahref click. But the page is getting refreshed only when alert is included in the code. If I remove the alert the same page is getting refreshed and not the new URL which I need.
use window.location instead of document.location function loadText(prod_id) { curUrl = window.location.split("?"); window.location = curUrl[0]+'?prodId='+prod_id; }
Problem in my javascript The page URL has to change when the loadTest() function is called on a ahref click. But the page is getting refreshed only when alert is included in the code. If I remove the alert the same page is getting refreshed and not the new URL which I need.
TITLE: Problem in my javascript QUESTION: The page URL has to change when the loadTest() function is called on a ahref click. But the page is getting refreshed only when alert is included in the code. If I remove the alert the same page is getting refreshed and not the new URL which I need. ANSWER: use window.locatio...
[ "javascript", "html" ]
0
3
70
2
0
2011-06-03T09:49:03.607000
2011-06-03T09:50:34.123000
6,225,497
6,225,551
Iphone application with login
I make iphone application. I use for root controller tab bar controller. One of my tabs is "My profile". In this tab I want to have two navigation view controllers. First controller should appear when user is not logged in. When user log in it should view second navigation controller. But I don't know how to do this. C...
You can use these links for your help. Login Screen screen switching
Iphone application with login I make iphone application. I use for root controller tab bar controller. One of my tabs is "My profile". In this tab I want to have two navigation view controllers. First controller should appear when user is not logged in. When user log in it should view second navigation controller. But ...
TITLE: Iphone application with login QUESTION: I make iphone application. I use for root controller tab bar controller. One of my tabs is "My profile". In this tab I want to have two navigation view controllers. First controller should appear when user is not logged in. When user log in it should view second navigatio...
[ "ios", "ios4", "uinavigationcontroller" ]
2
1
402
1
0
2011-06-03T09:49:11.363000
2011-06-03T09:55:01.930000
6,225,512
6,225,654
Knowing when a file has uploaded to Dropbox
I have managed to get my app to upload to Dropbox like so: NSString *docsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; [self.restClient uploadFile:@"ZipTest.zip" toPath:[NSString stringWithFormat:@"/%@", self.dropboxFolderName] fromPath:docsPath]; But am now tryin...
- (void)restClient:(DBRestClient *)client uploadedFile:(NSString *)srcPath { NSString *filename = [[srcPath pathComponents]lastObject]; NSString *message = [NSString stringWithFormat:@"Uploaded File:%@",filename]; UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Success" message:message delegate:nil cancelBu...
Knowing when a file has uploaded to Dropbox I have managed to get my app to upload to Dropbox like so: NSString *docsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; [self.restClient uploadFile:@"ZipTest.zip" toPath:[NSString stringWithFormat:@"/%@", self.dropboxFold...
TITLE: Knowing when a file has uploaded to Dropbox QUESTION: I have managed to get my app to upload to Dropbox like so: NSString *docsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; [self.restClient uploadFile:@"ZipTest.zip" toPath:[NSString stringWithFormat:@"/%@"...
[ "iphone", "file-upload", "upload", "dropbox" ]
1
1
737
1
0
2011-06-03T09:50:56.167000
2011-06-03T10:06:09.630000
6,225,516
6,225,881
iphone table views with a preloader images
I have table view to load data from an API call. I am using: NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; and: - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data for processing the result. I got the result, but my problem is when loading the ...
You can make use of UIActivityIndicatorView for accomplishing this.
iphone table views with a preloader images I have table view to load data from an API call. I am using: NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; and: - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data for processing the result. I got the ...
TITLE: iphone table views with a preloader images QUESTION: I have table view to load data from an API call. I am using: NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; and: - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data for processing the ...
[ "ios", "cocoa-touch", "nsurlconnection" ]
0
1
185
2
0
2011-06-03T09:51:16.780000
2011-06-03T10:26:45.677000
6,225,521
6,225,777
Text to speech conversion
I am using OpenEars in my app for speech to text conversion, but now the situation demands that I convert my text to speech. Can I do this using OpenEars only? Has anyone tried this? If so, please guide me on how to do this. Any help will be appreciated.
Yes it is possible through open ears. You can look at the sample project provided in the Openears itself with the help of FliteController. There is method called say. e.g. -(void)viewDidLoad { [super viewDidLoad]; // This is how to use an available instance of FliteController. [fliteController say:@"Welcome to OpenEars...
Text to speech conversion I am using OpenEars in my app for speech to text conversion, but now the situation demands that I convert my text to speech. Can I do this using OpenEars only? Has anyone tried this? If so, please guide me on how to do this. Any help will be appreciated.
TITLE: Text to speech conversion QUESTION: I am using OpenEars in my app for speech to text conversion, but now the situation demands that I convert my text to speech. Can I do this using OpenEars only? Has anyone tried this? If so, please guide me on how to do this. Any help will be appreciated. ANSWER: Yes it is po...
[ "cocoa-touch", "ipad", "text-to-speech", "openears" ]
1
6
1,376
2
0
2011-06-03T09:51:40.900000
2011-06-03T10:17:29.710000
6,225,524
6,225,573
Hierarchy Id, find parent by child
I have a table with following structure Id P1 P2(HirarchyId) ----- ------ -------------- 1 Name1 /1600/1601/ 2 Name2 /1300/ The key of hirarchy id is foreign key of different table Id P2 ---- ------ 1600 p2Name1 1601 p2Name2 1300 p2Name3 I want to write a query which can give result based on Id's of P2 I pass. Somethin...
SELECT TableP1.Id, TableP1.P1 FROM TableP1 JOIN TableP2 ON TableP1.P2.ToString() like '/'+TableP2.Id+'%' AND TableP2.Id in (1600, 1300)
Hierarchy Id, find parent by child I have a table with following structure Id P1 P2(HirarchyId) ----- ------ -------------- 1 Name1 /1600/1601/ 2 Name2 /1300/ The key of hirarchy id is foreign key of different table Id P2 ---- ------ 1600 p2Name1 1601 p2Name2 1300 p2Name3 I want to write a query which can give result b...
TITLE: Hierarchy Id, find parent by child QUESTION: I have a table with following structure Id P1 P2(HirarchyId) ----- ------ -------------- 1 Name1 /1600/1601/ 2 Name2 /1300/ The key of hirarchy id is foreign key of different table Id P2 ---- ------ 1600 p2Name1 1601 p2Name2 1300 p2Name3 I want to write a query which...
[ "sql-server-2008" ]
2
2
171
1
0
2011-06-03T09:51:59.913000
2011-06-03T09:57:40.327000
6,225,532
6,226,239
Asynchronous function execution?
in my iOS app I do the following. viewDidAppear(){ // Load a spinner in a view on the top [DSBezelActivityView newActivityViewForView:self.view]; // Execute code that require 3 seconds... // Stop the spinner [DSBezelActivityView removeViewAnimated:YES]; } The problem is that the spinner doesn't appear, because the the...
If you have a method like -(void) showSpinner:(UIView*)view { dispatch_async(dispatch_get_main_queue(), ^{ [DSBezelActivityView newActivityViewForView:view]; }); } there are several ways to call it from a different thread. Choose one from the following: [NSThread detachNewThreadSelector:@selector(showSpinner:) toTarget...
Asynchronous function execution? in my iOS app I do the following. viewDidAppear(){ // Load a spinner in a view on the top [DSBezelActivityView newActivityViewForView:self.view]; // Execute code that require 3 seconds... // Stop the spinner [DSBezelActivityView removeViewAnimated:YES]; } The problem is that the spinne...
TITLE: Asynchronous function execution? QUESTION: in my iOS app I do the following. viewDidAppear(){ // Load a spinner in a view on the top [DSBezelActivityView newActivityViewForView:self.view]; // Execute code that require 3 seconds... // Stop the spinner [DSBezelActivityView removeViewAnimated:YES]; } The problem ...
[ "iphone", "objective-c", "ios" ]
7
22
10,239
3
0
2011-06-03T09:52:48.867000
2011-06-03T11:01:52.777000
6,225,535
6,225,701
how to group by with a sql subqueries
I can't think clearly at the moment, I want to return counts by station_id, an example of output would be: station 1 has 3 fb post, 6 linkedin posts, 5 email posts station 2 has 3 fb post, 6 linkedin posts, 5 email posts So I need to group by the station id, my table structure is CREATE TABLE IF NOT EXISTS `posts` ( `p...
Or, the fastest way, avoiding joins and subselects to get it in the exact format you want: SELECT station_id, SUM(CASE WHEN type = 'linkedin' THEN 1 ELSE 0 END) AS 'linkedin', SUM(CASE WHEN type = 'fb' THEN 1 ELSE 0 END) AS 'fb', SUM(CASE WHEN type = 'email' THEN 1 ELSE 0 END) AS 'email' FROM posts GROUP BY station_id;...
how to group by with a sql subqueries I can't think clearly at the moment, I want to return counts by station_id, an example of output would be: station 1 has 3 fb post, 6 linkedin posts, 5 email posts station 2 has 3 fb post, 6 linkedin posts, 5 email posts So I need to group by the station id, my table structure is C...
TITLE: how to group by with a sql subqueries QUESTION: I can't think clearly at the moment, I want to return counts by station_id, an example of output would be: station 1 has 3 fb post, 6 linkedin posts, 5 email posts station 2 has 3 fb post, 6 linkedin posts, 5 email posts So I need to group by the station id, my ta...
[ "mysql", "sql" ]
4
14
7,121
4
0
2011-06-03T09:53:02.457000
2011-06-03T10:10:21.353000
6,225,536
6,245,728
How can I run several different `insert` statements in a single call with ADO.NET and Oracle?
The following works with MS SQL Server, but our Oracle system throws an error: ORA-00911: invalid character string strQuery = @" insert into DEVICE ( DEVICE_ID, DEVICE_NAME, TIMESTAMP) values (:DEVICE_ID,:DEVICE_NAME, sysdate); insert into INV ( INV_ID, DEVICE_ID, COMMENT, TIMESTAMP) values (:INV_ID,:DEVICE_ID,:COMMENT...
I'm not sure why @Tony Andrews answer didn't work. (Perhaps some of the column names are causing problems; you may want to avoid the names COMMENT and TIMESTAMP. TIMESTAMP worked ok for me, but I had to change COMMENT to COMMENTS.) Maybe a multi-table insert will work better: insert all into device(device_id, device_na...
How can I run several different `insert` statements in a single call with ADO.NET and Oracle? The following works with MS SQL Server, but our Oracle system throws an error: ORA-00911: invalid character string strQuery = @" insert into DEVICE ( DEVICE_ID, DEVICE_NAME, TIMESTAMP) values (:DEVICE_ID,:DEVICE_NAME, sysdate)...
TITLE: How can I run several different `insert` statements in a single call with ADO.NET and Oracle? QUESTION: The following works with MS SQL Server, but our Oracle system throws an error: ORA-00911: invalid character string strQuery = @" insert into DEVICE ( DEVICE_ID, DEVICE_NAME, TIMESTAMP) values (:DEVICE_ID,:DEV...
[ ".net", "sql", "oracle", "batch-file" ]
3
1
762
2
0
2011-06-03T09:53:29.923000
2011-06-05T20:41:48.647000
6,225,537
6,225,559
Convert .class to .java
I have some.class files that I need to convert to.java so I did: javap -c ClassName.class and all the time I have the same error ERROR:Could not find ClassName.class Do you guys have any idea of what might be the cause? I did man javap and as far as I know, the syntax is correct. If there is another way to convert it t...
Invoking javap to read the bytecode The javap command takes class-names without the.class extension. Try javap -c ClassName Converting.class files back to.java files javap will however not give you the implementations of the methods in java-syntax. It will at most give it to you in JVM bytecode format. To actually deco...
Convert .class to .java I have some.class files that I need to convert to.java so I did: javap -c ClassName.class and all the time I have the same error ERROR:Could not find ClassName.class Do you guys have any idea of what might be the cause? I did man javap and as far as I know, the syntax is correct. If there is ano...
TITLE: Convert .class to .java QUESTION: I have some.class files that I need to convert to.java so I did: javap -c ClassName.class and all the time I have the same error ERROR:Could not find ClassName.class Do you guys have any idea of what might be the cause? I did man javap and as far as I know, the syntax is correc...
[ "java" ]
40
50
318,469
5
0
2011-06-03T09:53:31.757000
2011-06-03T09:55:53.957000
6,225,542
6,226,737
How to @Inject a HttpSession object in a service layer (DAO) class in GWT using Guice?
I have such a dirty code in my GWT app, some of the classes of my service layer depend on an HttpSession object. So for example, in one of my DAO (which was a GWT-RPC endpoint) I have something like this: public class MyExampleDAO extends RemoteServiceServlet { public findItems() { // here I need to get the object sess...
getThreadLocalRequest().getSession() should do it. RequestFactoryServlet has a similar (but static) getThreadLocalRequest() method that you can access from your service. Otherwise, you can get Guice to inject a Provider, have a look at these projects https://github.com/mgenov/injecting-request-factory and https://githu...
How to @Inject a HttpSession object in a service layer (DAO) class in GWT using Guice? I have such a dirty code in my GWT app, some of the classes of my service layer depend on an HttpSession object. So for example, in one of my DAO (which was a GWT-RPC endpoint) I have something like this: public class MyExampleDAO ex...
TITLE: How to @Inject a HttpSession object in a service layer (DAO) class in GWT using Guice? QUESTION: I have such a dirty code in my GWT app, some of the classes of my service layer depend on an HttpSession object. So for example, in one of my DAO (which was a GWT-RPC endpoint) I have something like this: public cla...
[ "gwt", "dependency-injection", "guice", "httpsession", "requestfactory" ]
1
1
1,127
1
0
2011-06-03T09:53:51.083000
2011-06-03T11:50:00.710000
6,225,545
6,225,588
UpdatePanel with UploadFile control doesnt work well
I've three images. I use javascript to mark which one is selected. After user clicks on one I change its class to active. its. Now when I wasn't using updatepanel after form post I could see from code behind which element is active and it was correct. After adding updatePanel which contains entire form after postback w...
Your form must be a full postback. You have to add a Trigger for the Full postback, if your FileUpload control is in the update panel. Alternatively if you want to upload Asynchronously, you could try AJAX AsyncFileUpload control http://asp.net-informations.com/ajax/ajax-AsyncFileUpload.htm
UpdatePanel with UploadFile control doesnt work well I've three images. I use javascript to mark which one is selected. After user clicks on one I change its class to active. its. Now when I wasn't using updatepanel after form post I could see from code behind which element is active and it was correct. After adding up...
TITLE: UpdatePanel with UploadFile control doesnt work well QUESTION: I've three images. I use javascript to mark which one is selected. After user clicks on one I change its class to active. its. Now when I wasn't using updatepanel after form post I could see from code behind which element is active and it was correc...
[ "c#", "asp.net", "ajax", "file-upload", "updatepanel" ]
2
2
1,574
2
0
2011-06-03T09:54:21.297000
2011-06-03T09:59:15.430000
6,225,561
6,226,020
Show another instance of a sprite
Is it possible to show another instance of a sprite? What I'm trying to do is have a reflection of a animated sprite. What I've got so far is my Sprite called "canvas" that has things animating inside it by use of AS3. And what I want to do is show a copy of it flipped, below it to look like a reflection. I tried the f...
You could use BitmapData for that. class members: // flip vertically and shift by 100 (insert your canvas size) private var reflect:Matrix = new Matrix(1, 0, 0, -1, 0, 100); // instanciate BitmapData with 100x100 size (insert your canvas size), // filled with black but with 100% transparancy, it's an // ARGB value (0 =...
Show another instance of a sprite Is it possible to show another instance of a sprite? What I'm trying to do is have a reflection of a animated sprite. What I've got so far is my Sprite called "canvas" that has things animating inside it by use of AS3. And what I want to do is show a copy of it flipped, below it to loo...
TITLE: Show another instance of a sprite QUESTION: Is it possible to show another instance of a sprite? What I'm trying to do is have a reflection of a animated sprite. What I've got so far is my Sprite called "canvas" that has things animating inside it by use of AS3. And what I want to do is show a copy of it flippe...
[ "flash", "actionscript-3" ]
3
3
184
2
0
2011-06-03T09:55:58.240000
2011-06-03T10:39:57.193000
6,225,562
6,225,610
Quick Javascript inheritance: Understanding __proto__
Given the following constructor, Dog = function(name, age,...){ Animal.call(this, name, age,...); // And some other stuff that dogs do } I use the following line of code to copy my methods and properties across from the Animal class, Dog.prototype = new Animal(); Could you enlighten me as to how that differs from Dog.p...
__proto__ is a non-standard extension to JavaScript (common in various interpreters, but non-standard) that gives you direct access to the prototype behind an object. The prototype property of function objects is the object that will be assigned as the prototype behind an object created by calling the function via new....
Quick Javascript inheritance: Understanding __proto__ Given the following constructor, Dog = function(name, age,...){ Animal.call(this, name, age,...); // And some other stuff that dogs do } I use the following line of code to copy my methods and properties across from the Animal class, Dog.prototype = new Animal(); Co...
TITLE: Quick Javascript inheritance: Understanding __proto__ QUESTION: Given the following constructor, Dog = function(name, age,...){ Animal.call(this, name, age,...); // And some other stuff that dogs do } I use the following line of code to copy my methods and properties across from the Animal class, Dog.prototype ...
[ "javascript", "inheritance", "prototype-programming" ]
1
4
392
2
0
2011-06-03T09:56:03.893000
2011-06-03T10:02:09.087000
6,225,575
6,234,821
Quartz 2D Text Drawing Errors in Encoding and Transformation?
I'm working on a Text Addition feature for my App. This text is going to be added with CGContext and Quartz 2D. The variable text is pulled from a UITextField's text property. Here is the code I have so far: CGRect textBox = CGRectMake(0, 0, 300, 200); UIView *textView = [[UIView alloc] initWithFrame:textBox]; const ch...
For the text flipping, a solution to someone with the same problem was posted text inverted problem solution [Stackoverflow] - use: CGContextSetTextMatrix(context, CGAffineTransformMake(1.0,0.0, 0.0, -1.0, 0.0, 0.0)); For the encoding problem, you are getting the text cString with [text UTF8String] (UTF8 characters are...
Quartz 2D Text Drawing Errors in Encoding and Transformation? I'm working on a Text Addition feature for my App. This text is going to be added with CGContext and Quartz 2D. The variable text is pulled from a UITextField's text property. Here is the code I have so far: CGRect textBox = CGRectMake(0, 0, 300, 200); UIVie...
TITLE: Quartz 2D Text Drawing Errors in Encoding and Transformation? QUESTION: I'm working on a Text Addition feature for my App. This text is going to be added with CGContext and Quartz 2D. The variable text is pulled from a UITextField's text property. Here is the code I have so far: CGRect textBox = CGRectMake(0, 0...
[ "objective-c", "quartz-graphics", "cgcontext" ]
0
2
576
2
0
2011-06-03T09:57:54.317000
2011-06-04T05:03:21.900000
6,225,582
6,225,605
How to clear activity stack from service?
I want to cear the activity stack of my application after a certain time. I invoke a service with the alarm manager to delete some data. Is it possible to also clear the activity stack with the service? Thanks
I don't think you can "properly" do that.. but you can put a Broadcast Receiver on the Activities you want to close. Then send a broadcast which they receive and then "finish()" themselves.
How to clear activity stack from service? I want to cear the activity stack of my application after a certain time. I invoke a service with the alarm manager to delete some data. Is it possible to also clear the activity stack with the service? Thanks
TITLE: How to clear activity stack from service? QUESTION: I want to cear the activity stack of my application after a certain time. I invoke a service with the alarm manager to delete some data. Is it possible to also clear the activity stack with the service? Thanks ANSWER: I don't think you can "properly" do that....
[ "android", "service", "android-activity", "stack" ]
0
1
287
1
0
2011-06-03T09:58:39.097000
2011-06-03T10:01:19.367000
6,225,585
6,236,344
php handle put request from backbone.js
When backbone.js saves a model to the server, it sends a PUT request. How do I handle these with php? How do I take the contents that are sent with the put request, and store them in a database?
Here is another example: $values = json_decode(file_get_contents('php://input'), true); This would result in an Array (second parameter of json_decode()) $values which would contain your key => value pairs of the received json data.
php handle put request from backbone.js When backbone.js saves a model to the server, it sends a PUT request. How do I handle these with php? How do I take the contents that are sent with the put request, and store them in a database?
TITLE: php handle put request from backbone.js QUESTION: When backbone.js saves a model to the server, it sends a PUT request. How do I handle these with php? How do I take the contents that are sent with the put request, and store them in a database? ANSWER: Here is another example: $values = json_decode(file_get_co...
[ "php", "backbone.js", "put" ]
4
8
2,776
3
0
2011-06-03T09:58:53.093000
2011-06-04T11:01:54.023000
6,225,586
6,227,230
Lua pattern is not working properly when 0 is missing in the last row
below is my pattern which is working fine against the given string. local tempRec = [[ ABC01-USD-0322-A Total DUE amount: 2312.08 USD Value Date: 31 MAY 2011 Details:ABCDE - BCD: / ABC01 0212 23.79 / ARM01 0311 870.79 Details:FGHIJ - BCD: / ABC01 0323 1.88 Details:KLMNO - BCD: / ABC01 0314 1,035.99 Details:PQRST - BCD...
The short answer is that the digit before the punctuation is not optional in your pattern. Simply add a * to match as many digits, but allowing no digits as well. The other option is to use a? if you only want to match a single or no digits, but not any additional digits before that. paytternToMatch = "(%w%w%w[%w%d][%w...
Lua pattern is not working properly when 0 is missing in the last row below is my pattern which is working fine against the given string. local tempRec = [[ ABC01-USD-0322-A Total DUE amount: 2312.08 USD Value Date: 31 MAY 2011 Details:ABCDE - BCD: / ABC01 0212 23.79 / ARM01 0311 870.79 Details:FGHIJ - BCD: / ABC01 03...
TITLE: Lua pattern is not working properly when 0 is missing in the last row QUESTION: below is my pattern which is working fine against the given string. local tempRec = [[ ABC01-USD-0322-A Total DUE amount: 2312.08 USD Value Date: 31 MAY 2011 Details:ABCDE - BCD: / ABC01 0212 23.79 / ARM01 0311 870.79 Details:FGHIJ...
[ "lua", "lua-patterns" ]
0
1
112
2
0
2011-06-03T09:58:58.040000
2011-06-03T12:44:23.003000
6,225,587
6,225,849
member function pointer and callbacks
Hi I am trying to pass a callback which is a member function. I understand that a function pointer and a member function pointer are different and have tried to create a wrapper and use a static cast and the void pointer. Unfortunately I am missing something as my code produces an error at compile Error 16 error C2664:...
The problem is most likely, from what you show, that dSpaceCollide just wants a typedef void (*dNearCallback)(void*,dGeomID,dGeomID) callback, that is, a function with a single void* user-data pointer and the two dGeomID s as parameters. The void* is whatever data you passed to the dSpaceCollide then. Assuming dSpaceCo...
member function pointer and callbacks Hi I am trying to pass a callback which is a member function. I understand that a function pointer and a member function pointer are different and have tried to create a wrapper and use a static cast and the void pointer. Unfortunately I am missing something as my code produces an ...
TITLE: member function pointer and callbacks QUESTION: Hi I am trying to pass a callback which is a member function. I understand that a function pointer and a member function pointer are different and have tried to create a wrapper and use a static cast and the void pointer. Unfortunately I am missing something as my...
[ "c++", "function", "pointers", "callback", "member" ]
1
1
1,189
3
0
2011-06-03T09:59:14.323000
2011-06-03T10:23:59.490000
6,225,590
6,225,658
python - find occurrences of strings from a reference file within an input file
I have two files. Call one file as a reference file. This file contains a list of strings each on a separate line. The other file is an input file. It also has strings on on each line. I want to find the occurrence of each string from the reference file within the input file. This is my code def count_line_occurrences(...
It sort of works for me. Calling your function like... if __name__ == "__main__": x = count_line_occurrences(["a","b","c"],["c","c","b","a"]) print x prints out... found a found b found c found c {'a': 1, 'c': 2, 'b': 1} @Sumod... isn't that the expected behavior? Edition after seeing @Sumod's input data So the problem...
python - find occurrences of strings from a reference file within an input file I have two files. Call one file as a reference file. This file contains a list of strings each on a separate line. The other file is an input file. It also has strings on on each line. I want to find the occurrence of each string from the r...
TITLE: python - find occurrences of strings from a reference file within an input file QUESTION: I have two files. Call one file as a reference file. This file contains a list of strings each on a separate line. The other file is an input file. It also has strings on on each line. I want to find the occurrence of each...
[ "python" ]
2
3
646
1
0
2011-06-03T09:59:37.177000
2011-06-03T10:06:22.693000
6,225,595
6,226,122
iOS window-based-app projects kill problem
When I create a window-based-application (in Xcode 4, via simulator and iPhone device, even if don't add anything to the project or the window), if I kill the app, when I open it again the view is frozen and when I click the home button it disappears into a black window and I can't do anything... What is the problem? T...
check if the application is running in background, it should be in your plist. that will be a start, if the problem is still there u should post some of your code.
iOS window-based-app projects kill problem When I create a window-based-application (in Xcode 4, via simulator and iPhone device, even if don't add anything to the project or the window), if I kill the app, when I open it again the view is frozen and when I click the home button it disappears into a black window and I ...
TITLE: iOS window-based-app projects kill problem QUESTION: When I create a window-based-application (in Xcode 4, via simulator and iPhone device, even if don't add anything to the project or the window), if I kill the app, when I open it again the view is frozen and when I click the home button it disappears into a b...
[ "iphone", "objective-c", "xcode", "ios", "xcode4" ]
0
1
242
1
0
2011-06-03T10:00:00.677000
2011-06-03T10:48:09.617000
6,225,600
6,225,628
How do I set up Rails for French language?
I have to develop a Ruby on Rails app for my company and don't know how to configure it for a French site. I don't need multiple language support, I just want to have error messages, pluralization and date format for French. I tried to set: config.i18n.default_locale =:fr in my application.rb file but it doesn't seem t...
As far as I know, Rails comes with en locale only. You can get additional locales here: https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale/
How do I set up Rails for French language? I have to develop a Ruby on Rails app for my company and don't know how to configure it for a French site. I don't need multiple language support, I just want to have error messages, pluralization and date format for French. I tried to set: config.i18n.default_locale =:fr in m...
TITLE: How do I set up Rails for French language? QUESTION: I have to develop a Ruby on Rails app for my company and don't know how to configure it for a French site. I don't need multiple language support, I just want to have error messages, pluralization and date format for French. I tried to set: config.i18n.defaul...
[ "ruby-on-rails", "ruby", "internationalization" ]
6
4
3,555
3
0
2011-06-03T10:00:43.333000
2011-06-03T10:04:03.903000
6,225,603
6,237,873
Xcode 4 became extremely slow and kills my hard drive
My machine has 8 GB or RAM, Core 2 Duo 3,06 GHZ and it seems it is not enough for Xcode 4 (4.0.1). From some time now it started to behave more and more slow. Auto completion, editing code as well as Xib files became almost impossible to use. Other applications behave smoothly. Activity monitor shows a lot of RAM usage...
UPDATE: The solution was to mock around with #import "header.h" statements. It looks like Xcode requires a lot of processing power for intellisense when you you have complicated / circular imports structure (tracked down by performance tools - Xcode was falling into infinite recursive function call loop). When I moved ...
Xcode 4 became extremely slow and kills my hard drive My machine has 8 GB or RAM, Core 2 Duo 3,06 GHZ and it seems it is not enough for Xcode 4 (4.0.1). From some time now it started to behave more and more slow. Auto completion, editing code as well as Xib files became almost impossible to use. Other applications beha...
TITLE: Xcode 4 became extremely slow and kills my hard drive QUESTION: My machine has 8 GB or RAM, Core 2 Duo 3,06 GHZ and it seems it is not enough for Xcode 4 (4.0.1). From some time now it started to behave more and more slow. Auto completion, editing code as well as Xib files became almost impossible to use. Other...
[ "xcode", "performance", "android-activity", "xcode4", "disk" ]
15
11
10,156
5
0
2011-06-03T10:01:13.167000
2011-06-04T16:13:38.367000
6,225,613
6,290,974
timed loop to retrieve gps co-ordinates and eventually calculate speed
* UPDATED AT THE BOTTOM * Basically, I'm trying to write a simple app to locate where I am and update my position every [ fixed time interval ] I followed this tutorial and managed to obtain a value my position. However, for the life of me I cannot get it to work in an endless loop. I just want it to keep going until I...
package Hartford.gps; import java.math.BigDecimal; import android.app.Activity; import android.content.Context; import android.location.Criteria; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.widget.TextVie...
timed loop to retrieve gps co-ordinates and eventually calculate speed * UPDATED AT THE BOTTOM * Basically, I'm trying to write a simple app to locate where I am and update my position every [ fixed time interval ] I followed this tutorial and managed to obtain a value my position. However, for the life of me I cannot ...
TITLE: timed loop to retrieve gps co-ordinates and eventually calculate speed QUESTION: * UPDATED AT THE BOTTOM * Basically, I'm trying to write a simple app to locate where I am and update my position every [ fixed time interval ] I followed this tutorial and managed to obtain a value my position. However, for the li...
[ "android", "performance", "geolocation", "gps", "position" ]
0
1
2,735
1
0
2011-06-03T10:02:21.270000
2011-06-09T09:50:44.117000
6,225,617
6,225,744
PHP keep form info after submit form failed
Hello I am building a form in a mvc system view, and i want that all the inserted values will be kept,in case of form submit failure. How can this be done: i tried like (example for a field): Nume > but of course, it doesn't work the first time (when no post action is done). what is the simplest way to do this? any ide...
I would suggest something like: Nume > You also had a typo in the $_POST["user_firstmane"] should be $_POST["user_firstname"]:)
PHP keep form info after submit form failed Hello I am building a form in a mvc system view, and i want that all the inserted values will be kept,in case of form submit failure. How can this be done: i tried like (example for a field): Nume > but of course, it doesn't work the first time (when no post action is done). ...
TITLE: PHP keep form info after submit form failed QUESTION: Hello I am building a form in a mvc system view, and i want that all the inserted values will be kept,in case of form submit failure. How can this be done: i tried like (example for a field): Nume > but of course, it doesn't work the first time (when no post...
[ "php", "forms", "submit" ]
3
1
7,808
5
0
2011-06-03T10:02:51.160000
2011-06-03T10:14:30.517000
6,225,633
6,225,820
can you create a 3d raised box using CSS or do you need to use images?
I am trying to create a little 3d raised "panel" or "box" on my site. I found a similar example on this page where they have this page with windows that are "raised" off the page with a title box. In this case, they are using an image for the whole box and just the text in the middle is actual text on the page. I wante...
Here's something similar using CSS3 for the fancy parts: http://jsfiddle.net/RrfJb/ (view in a WebKit browser such as Chrome) It can be made to work in "all browsers". For Firefox it's as easy as adding the -moz prefix versions. For IE, use CSS3 PIE for the gradients and box shadow, and this tool to generate transform ...
can you create a 3d raised box using CSS or do you need to use images? I am trying to create a little 3d raised "panel" or "box" on my site. I found a similar example on this page where they have this page with windows that are "raised" off the page with a title box. In this case, they are using an image for the whole ...
TITLE: can you create a 3d raised box using CSS or do you need to use images? QUESTION: I am trying to create a little 3d raised "panel" or "box" on my site. I found a similar example on this page where they have this page with windows that are "raised" off the page with a title box. In this case, they are using an im...
[ "javascript", "html", "css", "3d" ]
0
2
2,472
3
0
2011-06-03T10:04:46.827000
2011-06-03T10:21:39.160000
6,225,634
6,225,762
Select td elements if checkbox is on
I have this table, from which i'd like to select all the td elements value if the checkbox is checked and then put all the elements in some array or string, so that i can transfer it to server side. {name} {host} Here is what i am doing on jquery side, but it does the selecting thing irrespective of the checkbox being ...
$('#tableDg tbody tr').live('click', function (event) { if ($('input.chkbCsm', this).is(':checked')) { $('input:hidden', this).each(function() { alert(this.value); }); } });
Select td elements if checkbox is on I have this table, from which i'd like to select all the td elements value if the checkbox is checked and then put all the elements in some array or string, so that i can transfer it to server side. {name} {host} Here is what i am doing on jquery side, but it does the selecting thin...
TITLE: Select td elements if checkbox is on QUESTION: I have this table, from which i'd like to select all the td elements value if the checkbox is checked and then put all the elements in some array or string, so that i can transfer it to server side. {name} {host} Here is what i am doing on jquery side, but it does ...
[ "javascript", "jquery" ]
0
1
360
2
0
2011-06-03T10:04:50.270000
2011-06-03T10:15:43.480000
6,225,638
6,225,735
php cookie check accepted like facebook
i'm searching for the correct solution to check if the user accepts cookies or not without realoading the page. Facebook and other pages can check it without a page reload. I can't find any solution like this. Has anybody a good pratice to check if the user has cookies accepted? Thank you very much.
My guess is that you should write a cookie and then query another page (the one who actually checks if the cookies are enabled) through AJAX.
php cookie check accepted like facebook i'm searching for the correct solution to check if the user accepts cookies or not without realoading the page. Facebook and other pages can check it without a page reload. I can't find any solution like this. Has anybody a good pratice to check if the user has cookies accepted? ...
TITLE: php cookie check accepted like facebook QUESTION: i'm searching for the correct solution to check if the user accepts cookies or not without realoading the page. Facebook and other pages can check it without a page reload. I can't find any solution like this. Has anybody a good pratice to check if the user has ...
[ "php", "facebook", "cookies" ]
0
0
426
1
0
2011-06-03T10:05:13.970000
2011-06-03T10:13:44.717000
6,225,646
6,225,685
Delete a Batch file variable in a text file
I am currently trying to delete a variable from a batch file which is in a text file e.g. delete %variable% where %variable% = "test" So the batch script would delete the instance of "test" in the specified text file Can this be done?
@echo off setlocal enabledelayedexpansion set variable=test for /f "delims=" %%l in (foo.txt) do ( set "line=%%f" echo!line:%variable%=! )
Delete a Batch file variable in a text file I am currently trying to delete a variable from a batch file which is in a text file e.g. delete %variable% where %variable% = "test" So the batch script would delete the instance of "test" in the specified text file Can this be done?
TITLE: Delete a Batch file variable in a text file QUESTION: I am currently trying to delete a variable from a batch file which is in a text file e.g. delete %variable% where %variable% = "test" So the batch script would delete the instance of "test" in the specified text file Can this be done? ANSWER: @echo off setl...
[ "windows", "batch-file" ]
0
0
800
2
0
2011-06-03T10:05:42.400000
2011-06-03T10:08:40.970000
6,225,647
6,226,130
C# AnsiString to String
I have an external DLL that returns an AnsiString. I have set my code up like so: [DllImport("CDCrypt.dll", CharSet = CharSet.Ansi)] public static extern string Decrypt(string s); public string myDllMessage() { return DllMessage("Û(ÉÄ´-zÕ< tÆ"); } Is the cast from AnsiString to String ok with the external dll referenc...
Functions that returns strings are a memory management problem. Somebody is going to have to release the memory for the string. The pinvoke marshaller will try to take care of that, it uses CoTaskMemFree(). This is not very likely to work out in practice, native code rarely uses CoTaskMemAlloc() to allocate the memory ...
C# AnsiString to String I have an external DLL that returns an AnsiString. I have set my code up like so: [DllImport("CDCrypt.dll", CharSet = CharSet.Ansi)] public static extern string Decrypt(string s); public string myDllMessage() { return DllMessage("Û(ÉÄ´-zÕ< tÆ"); } Is the cast from AnsiString to String ok with t...
TITLE: C# AnsiString to String QUESTION: I have an external DLL that returns an AnsiString. I have set my code up like so: [DllImport("CDCrypt.dll", CharSet = CharSet.Ansi)] public static extern string Decrypt(string s); public string myDllMessage() { return DllMessage("Û(ÉÄ´-zÕ< tÆ"); } Is the cast from AnsiString t...
[ "c#", "string" ]
0
1
2,487
2
0
2011-06-03T10:05:49.213000
2011-06-03T10:49:10.273000
6,225,651
6,225,951
Default variable referencing own class in python
I'm trying to write something like: class MyClass(object): @staticmethod def test(x, y, z=None): if not z: z = external_function(MyClass) Is it possible in python to rewrite it to something like: class MyClass(object): @staticmethod def test(x, y, z=external_function(MyClass)): pass (The second code does not work as it...
It is not possible to rewrite the code that way. The closest you can do is something like: class MyClass: pass def test(x, y, z=external_function(MyClass): pass MyClass.test = staticmethod(test) del test Note that this assumes Python 3; in Python 2, you may need to fiddle around with the new module. But though this i...
Default variable referencing own class in python I'm trying to write something like: class MyClass(object): @staticmethod def test(x, y, z=None): if not z: z = external_function(MyClass) Is it possible in python to rewrite it to something like: class MyClass(object): @staticmethod def test(x, y, z=external_function(MyC...
TITLE: Default variable referencing own class in python QUESTION: I'm trying to write something like: class MyClass(object): @staticmethod def test(x, y, z=None): if not z: z = external_function(MyClass) Is it possible in python to rewrite it to something like: class MyClass(object): @staticmethod def test(x, y, z=ext...
[ "python", "default-value" ]
3
3
402
2
0
2011-06-03T10:06:01.673000
2011-06-03T10:33:33.310000
6,225,653
6,226,111
In a post transform to entities the tags that are not allowed and keep the tags allowed
I have a form where an user can post a global notice into the system (for other users to see). The system outputs HTML directly from the DB (when a user wanto to see a notice). I'd like to allow some html tags to stay intact and to have the rest of them with htmlspecialchars() applied. I already tried to apply str_repl...
You might try this code ( should be improved ): function callback(array $matches) { return htmlspecialchars_decode($matches[0]); } $str = 'some string with tags '. ' some link '. ' '; $str = htmlspecialchars($str); $str = preg_replace_callback('#(<(i|a)(?:.+?)?>.*?</(\1)>|<(?:img)(?:.*?)?/>)#', 'callback', $str); echo ...
In a post transform to entities the tags that are not allowed and keep the tags allowed I have a form where an user can post a global notice into the system (for other users to see). The system outputs HTML directly from the DB (when a user wanto to see a notice). I'd like to allow some html tags to stay intact and to ...
TITLE: In a post transform to entities the tags that are not allowed and keep the tags allowed QUESTION: I have a form where an user can post a global notice into the system (for other users to see). The system outputs HTML directly from the DB (when a user wanto to see a notice). I'd like to allow some html tags to s...
[ "php", "post", "htmlspecialchars" ]
0
1
135
2
0
2011-06-03T10:06:04.553000
2011-06-03T10:46:58.550000
6,225,657
6,225,794
Please explain this pattern when using abstract method
I've seen the following pattern used in many places: abstract class SimpleProvider { public object Create(IContext context) { return CreateInstance(context); } protected abstract T CreateInstance(IContext context); } I don't understand the practical difference, why is it not just written as: abstract class SimpleProvi...
So the only difference is the return type (Object instead of T), which would mean a cast is required by the caller. The only reason I can think of to do this is if they were implemented an interface which had object Create(IContext context);
Please explain this pattern when using abstract method I've seen the following pattern used in many places: abstract class SimpleProvider { public object Create(IContext context) { return CreateInstance(context); } protected abstract T CreateInstance(IContext context); } I don't understand the practical difference, wh...
TITLE: Please explain this pattern when using abstract method QUESTION: I've seen the following pattern used in many places: abstract class SimpleProvider { public object Create(IContext context) { return CreateInstance(context); } protected abstract T CreateInstance(IContext context); } I don't understand the practi...
[ "c#", "oop", "class-design", "abstract-class", "abstract-methods" ]
3
2
148
5
0
2011-06-03T10:06:18.857000
2011-06-03T10:18:57.850000
6,225,659
6,225,733
Display key and value of HashMap entries in JSF page
I would like to display HashMap keys and its associated value in the JSF UI. How can I achieve this? How can I iterate over a HashMap in JSF page using some iterator component like?
Only supports Map. Each iteration gives a Map.Entry instance back (like as in a normal Java for loop). Key: #{entry.key}, value: #{entry.value} The (and ) only supports List (JSF 2.2 will come with Collection support). You could copy all keys in a separate List and then iterate over it instead and then use the iterated...
Display key and value of HashMap entries in JSF page I would like to display HashMap keys and its associated value in the JSF UI. How can I achieve this? How can I iterate over a HashMap in JSF page using some iterator component like?
TITLE: Display key and value of HashMap entries in JSF page QUESTION: I would like to display HashMap keys and its associated value in the JSF UI. How can I achieve this? How can I iterate over a HashMap in JSF page using some iterator component like? ANSWER: Only supports Map. Each iteration gives a Map.Entry instan...
[ "jsf", "hashmap" ]
17
36
42,687
2
0
2011-06-03T10:06:47.377000
2011-06-03T10:13:33.933000
6,225,667
6,225,760
Is it possible in Java to initialise a final data member based on constructor call?
Is it possible to make a modification as specified in the class below, and initialize a member for existing callers to some default value, say null? Member is required to be private final as persistence requirement. // initial version of the class public class A { A() { // do some work here } } // the following modifi...
Why can't you just have: public class A { private final String member; A(String member) { this.member = member; } A() { this(null); } } This is the usual pattern for constructor chaining; have the less-specific versions call the more-specific versions, supplying default parameters as appropriate.
Is it possible in Java to initialise a final data member based on constructor call? Is it possible to make a modification as specified in the class below, and initialize a member for existing callers to some default value, say null? Member is required to be private final as persistence requirement. // initial version o...
TITLE: Is it possible in Java to initialise a final data member based on constructor call? QUESTION: Is it possible to make a modification as specified in the class below, and initialize a member for existing callers to some default value, say null? Member is required to be private final as persistence requirement. //...
[ "java", "constructor" ]
4
6
535
3
0
2011-06-03T10:07:10.593000
2011-06-03T10:15:35.640000
6,225,670
6,227,366
Regular expression to read tags in a HTML
Chicago, IL Weather I want to get the text in tag h1. for this I want to use regular expression code in C#. Can anybody tell me the solution?
Give it a shot String h1Regex = " ]*?>(?.*?) "; MatchCollection mc = Regex.Matches(Data, h1Regex, RegexOptions.Singleline); foreach (Match m in mc) { Console.Writeline (m.Groups["TagText"].Value); }
Regular expression to read tags in a HTML Chicago, IL Weather I want to get the text in tag h1. for this I want to use regular expression code in C#. Can anybody tell me the solution?
TITLE: Regular expression to read tags in a HTML QUESTION: Chicago, IL Weather I want to get the text in tag h1. for this I want to use regular expression code in C#. Can anybody tell me the solution? ANSWER: Give it a shot String h1Regex = " ]*?>(?.*?) "; MatchCollection mc = Regex.Matches(Data, h1Regex, RegexOptio...
[ "c#", "asp.net", "regex" ]
2
2
8,494
3
0
2011-06-03T10:07:25.727000
2011-06-03T12:55:51.400000
6,225,672
6,225,803
When to Thread. When not to Thread
I'm new to the idea of Threading, but not asynchronous behavior. My Android app is taking ~180 millisecond to start up and ~550 milli when I use GoogleAnalytics trackViewPage method and MobFoxView constructor. Coming from Actionscript 3, anything that "took time" was automatically async and I was forced to handle it wi...
You need to know one important thing - by default everything you do without starting separate thread is executed on "main" thread (also knows as UI-thread). If you do something, which can block - your UI will lag and users will suffer. If you doing something, which is not about UI but about database query, network call...
When to Thread. When not to Thread I'm new to the idea of Threading, but not asynchronous behavior. My Android app is taking ~180 millisecond to start up and ~550 milli when I use GoogleAnalytics trackViewPage method and MobFoxView constructor. Coming from Actionscript 3, anything that "took time" was automatically asy...
TITLE: When to Thread. When not to Thread QUESTION: I'm new to the idea of Threading, but not asynchronous behavior. My Android app is taking ~180 millisecond to start up and ~550 milli when I use GoogleAnalytics trackViewPage method and MobFoxView constructor. Coming from Actionscript 3, anything that "took time" was...
[ "java", "android", "multithreading", "asynchronous", "android-asynctask" ]
0
4
362
1
0
2011-06-03T10:07:43.743000
2011-06-03T10:19:37.247000
6,225,678
6,226,257
Debug.Assert sometimes does not work
I have the following issue with a Debug.Assert ine in a function public override ReportErrorLevel GenerateResults(bool reformat) {... for (int Col = MinResultsCol; Col < MaxResultsCol + 1; Col++) { try { ReportColumnTitle ColTitle = ColumnInfo[Col]; #if DEBUG Debug.Assert(ColTitle.BreakOnGenerate, "..."); #endif... } ...
This behavior matches a problem in the debugger in VS2008 SP1. There was a hotfix released for it. It came back in VS2010, its SP1 fixed it again. Both the hotfix and SP1 are known to be quite stable and take care of debugger problems, I strongly recommend you install it.
Debug.Assert sometimes does not work I have the following issue with a Debug.Assert ine in a function public override ReportErrorLevel GenerateResults(bool reformat) {... for (int Col = MinResultsCol; Col < MaxResultsCol + 1; Col++) { try { ReportColumnTitle ColTitle = ColumnInfo[Col]; #if DEBUG Debug.Assert(ColTitle....
TITLE: Debug.Assert sometimes does not work QUESTION: I have the following issue with a Debug.Assert ine in a function public override ReportErrorLevel GenerateResults(bool reformat) {... for (int Col = MinResultsCol; Col < MaxResultsCol + 1; Col++) { try { ReportColumnTitle ColTitle = ColumnInfo[Col]; #if DEBUG Debu...
[ "c#", "visual-studio", "debugging" ]
2
6
1,397
1
0
2011-06-03T10:07:56.783000
2011-06-03T11:03:14.837000
6,225,682
6,225,751
Passing JVM arguments to Tomcat when running as a service?
I need to pass a couple of JVM arguments to the JVM which Tomcat is running in so that my application can pick them up. I want to follow the process outlined in this article to pick up environment variables. How would I go about doing this? UPDATE Sorry This is running under windows (7 on my Dev machine 2003 on client ...
You need to edit the Windows service. There are three ways to do this: Start Tomcat5w with //MS// ServiceName to get an icon in the system tray which gives you a quick access to the configuration of the service. Open the service manager in the "Control Panel". There is an entry for Tomcat. In the editor, there is a tab...
Passing JVM arguments to Tomcat when running as a service? I need to pass a couple of JVM arguments to the JVM which Tomcat is running in so that my application can pick them up. I want to follow the process outlined in this article to pick up environment variables. How would I go about doing this? UPDATE Sorry This is...
TITLE: Passing JVM arguments to Tomcat when running as a service? QUESTION: I need to pass a couple of JVM arguments to the JVM which Tomcat is running in so that my application can pick them up. I want to follow the process outlined in this article to pick up environment variables. How would I go about doing this? UP...
[ "java", "environment-variables", "jvm-arguments", "tomcat" ]
28
25
62,341
2
0
2011-06-03T10:08:13.897000
2011-06-03T10:14:52
6,225,689
6,225,900
Adding multiple instances of a Sprite?
I am building a Custom Image Picker, that shows 6 alternative versions. However the photo is only showing on the 6th item. _model.selectedPhoto returns a Sprite, and does not let the app function correctly. However when I use _model.photos[ii], A photo is added to each item - Why is this? I need to add _model.selectedP...
Ummm it's only showing the one photo on the 6th item because you're running a for loop 6 times and adding the selected photo to each new sprite in succession. You see when you add a display object to another display object, and then add that same display object to something else, the original item is pulled from the fi...
Adding multiple instances of a Sprite? I am building a Custom Image Picker, that shows 6 alternative versions. However the photo is only showing on the 6th item. _model.selectedPhoto returns a Sprite, and does not let the app function correctly. However when I use _model.photos[ii], A photo is added to each item - Why ...
TITLE: Adding multiple instances of a Sprite? QUESTION: I am building a Custom Image Picker, that shows 6 alternative versions. However the photo is only showing on the 6th item. _model.selectedPhoto returns a Sprite, and does not let the app function correctly. However when I use _model.photos[ii], A photo is added t...
[ "actionscript-3", "instance", "sprite" ]
0
3
2,448
2
0
2011-06-03T10:09:00.323000
2011-06-03T10:28:57.740000
6,225,692
6,227,493
Multi-line input in EShell
Is there a way for multi-line input in EShell? When I want to do a quick function definition at the commandline of EShell, it doesn't really work. I tried using explicit linebreaks (\n), as well as single-quotes ('') and double quotes (""), but with no success. When I write a newline \n and press enter (point is at pos...
You have to leave a parenthesis open to prevent Eshell from evaluating the input prematurely. Also, as pointed out by phils, def is not defined in stock Elisp; you probably want defun.
Multi-line input in EShell Is there a way for multi-line input in EShell? When I want to do a quick function definition at the commandline of EShell, it doesn't really work. I tried using explicit linebreaks (\n), as well as single-quotes ('') and double quotes (""), but with no success. When I write a newline \n and p...
TITLE: Multi-line input in EShell QUESTION: Is there a way for multi-line input in EShell? When I want to do a quick function definition at the commandline of EShell, it doesn't really work. I tried using explicit linebreaks (\n), as well as single-quotes ('') and double quotes (""), but with no success. When I write ...
[ "emacs", "elisp", "eshell" ]
3
0
376
2
0
2011-06-03T10:09:07.383000
2011-06-03T13:09:16.177000
6,225,696
6,226,906
Javascript: sync to async converter libs
1) What is better streamlinejs: https://github.com/Sage/streamlinejs or narrative: http://www.neilmix.com/narrativejs/? any others libs? 2) How does any of those libraries even work? (I read the docs, I am looking for a simplify explanation of what's going on behind the scene..)
As far as question #2....in general these things: parse javascript into some abstract syntax tree (AST) transform the AST stringify the transformed tree back into javascript I wrote a partial converter as a learning experience a while back. I used uglify.js to parse into an AST and then the tree walker that lib provide...
Javascript: sync to async converter libs 1) What is better streamlinejs: https://github.com/Sage/streamlinejs or narrative: http://www.neilmix.com/narrativejs/? any others libs? 2) How does any of those libraries even work? (I read the docs, I am looking for a simplify explanation of what's going on behind the scene..)
TITLE: Javascript: sync to async converter libs QUESTION: 1) What is better streamlinejs: https://github.com/Sage/streamlinejs or narrative: http://www.neilmix.com/narrativejs/? any others libs? 2) How does any of those libraries even work? (I read the docs, I am looking for a simplify explanation of what's going on b...
[ "asynchronous", "node.js", "javascript" ]
2
2
833
1
0
2011-06-03T10:09:54.847000
2011-06-03T12:09:51.923000
6,225,700
6,297,050
Sorting Topscorecollector Results in Lucene.net?
I am doing a search operation by using lucene where i was taking my results by using topscorecollector, but i found that it unable to sort my topscorecollector results. I found it quiet odd to sort that. Can we sort the TopscoreCollector results? My code looks like this TopScoreDocCollector collector = TopScoreDocColle...
TopScoreDocCollector will return results sorted by score. To get results sorted on a field you will need to use a method overload that returns TopFieldDocs. IE: IndexSearcher.Search(query, filter, nResults, sort) If you dont want to limit the number of results use a very large value for the nResults parameter. If i rem...
Sorting Topscorecollector Results in Lucene.net? I am doing a search operation by using lucene where i was taking my results by using topscorecollector, but i found that it unable to sort my topscorecollector results. I found it quiet odd to sort that. Can we sort the TopscoreCollector results? My code looks like this ...
TITLE: Sorting Topscorecollector Results in Lucene.net? QUESTION: I am doing a search operation by using lucene where i was taking my results by using topscorecollector, but i found that it unable to sort my topscorecollector results. I found it quiet odd to sort that. Can we sort the TopscoreCollector results? My cod...
[ "lucene.net" ]
0
1
2,277
1
0
2011-06-03T10:10:18.490000
2011-06-09T17:45:02.447000
6,225,716
6,225,800
Cast issues between generic list and CollectionDataContract
I have the following collection contract defined: [CollectionDataContract(Name = "Centres")] public class Centres: List {} and the following operation contract defined to return this collection public Model.Centres GetCentres() { List allCentres = (from c in Model.Centre.GetCentres() where c.Visible == true select c).T...
The problem is Centres "is a" List, List is not a Centres. Despite Centres having no implementation it is still a sub-class of List, you could extend your Centres class to have an implicit conversion operator or, perhaps add a constructor to Centres that takes a List as a parameter. Try changing Centres to somthing lik...
Cast issues between generic list and CollectionDataContract I have the following collection contract defined: [CollectionDataContract(Name = "Centres")] public class Centres: List {} and the following operation contract defined to return this collection public Model.Centres GetCentres() { List allCentres = (from c in M...
TITLE: Cast issues between generic list and CollectionDataContract QUESTION: I have the following collection contract defined: [CollectionDataContract(Name = "Centres")] public class Centres: List {} and the following operation contract defined to return this collection public Model.Centres GetCentres() { List allCent...
[ "c#", "wcf", "type-conversion", "datacontractserializer" ]
1
1
958
3
0
2011-06-03T10:11:43.533000
2011-06-03T10:19:21.490000
6,225,722
6,225,869
Conditional ActionLink in Razor view not rendering(asp.net mvc 3)
I am scratching my head as to why not this isn't working: @if (Model.Guid!= null) { Html.ActionLink("Fil", "GetFile", new { id = Model.DocumentID }); } The conditional on its own is working as putting som random HTML in there instead of an actionlink works: @if (Model.Guid!= null){ Test } Likewise the actionlink on it'...
You need to put an @ sign before the Html.ActionLink. Like this: @if (Model.Guid!= null) { @Html.ActionLink("Fil", "GetFile", new { id = Model.DocumentID }); } EDIT: Forgot to add that you don't need the semi colon, but you can leave it in if you want.
Conditional ActionLink in Razor view not rendering(asp.net mvc 3) I am scratching my head as to why not this isn't working: @if (Model.Guid!= null) { Html.ActionLink("Fil", "GetFile", new { id = Model.DocumentID }); } The conditional on its own is working as putting som random HTML in there instead of an actionlink wor...
TITLE: Conditional ActionLink in Razor view not rendering(asp.net mvc 3) QUESTION: I am scratching my head as to why not this isn't working: @if (Model.Guid!= null) { Html.ActionLink("Fil", "GetFile", new { id = Model.DocumentID }); } The conditional on its own is working as putting som random HTML in there instead of...
[ "asp.net-mvc", "asp.net-mvc-3", "razor" ]
5
10
3,566
1
0
2011-06-03T10:12:28.270000
2011-06-03T10:26:06.200000
6,225,740
6,225,796
How to improve the LINQ query?
This is what i got: int? productID = (ClientProduct!= null? (int?)ClientProduct.ProductID: null); result = (from po in ((Chase_Media_Pro_Entity_Model)this.NavigationItem.ObjectContext).raPurchaseOrder_List where po.ClientID == Client.CustomerID && ((object.Equals(po.ClientProductID, productID)) || (po.ClientProductID ...
How about && ((productID.HasValue && po.ClientProductID.HasValue)? po.ClientProductID.Value = productID.Value: true)
How to improve the LINQ query? This is what i got: int? productID = (ClientProduct!= null? (int?)ClientProduct.ProductID: null); result = (from po in ((Chase_Media_Pro_Entity_Model)this.NavigationItem.ObjectContext).raPurchaseOrder_List where po.ClientID == Client.CustomerID && ((object.Equals(po.ClientProductID, prod...
TITLE: How to improve the LINQ query? QUESTION: This is what i got: int? productID = (ClientProduct!= null? (int?)ClientProduct.ProductID: null); result = (from po in ((Chase_Media_Pro_Entity_Model)this.NavigationItem.ObjectContext).raPurchaseOrder_List where po.ClientID == Client.CustomerID && ((object.Equals(po.Cli...
[ "c#", "linq", "linq-to-entities" ]
0
1
110
2
0
2011-06-03T10:14:12.197000
2011-06-03T10:19:01.967000
6,225,756
6,225,870
What annotations and configuration I should make to parse JSON object
I have a request(POST or GET), having one variable "data" (coming from Xcode) now data have assigned JSON object data={"method":"Auth","action":"login"} now I have a bean having exactly these two fields(i.e. method,action) now in Spring controller I have method "login". I want this method to be invoked based on value i...
You need to add Jackson to the classpath, and add to your Spring context, then Spring will automatically register a MappingJacksonHttpMessageConverter for JSON Objects. Now Annotate your method like this: @ResponseBody @RequestMapping("/some/path") public YourResponseObject someName(@RequestBody YourRequestObject data)...
What annotations and configuration I should make to parse JSON object I have a request(POST or GET), having one variable "data" (coming from Xcode) now data have assigned JSON object data={"method":"Auth","action":"login"} now I have a bean having exactly these two fields(i.e. method,action) now in Spring controller I ...
TITLE: What annotations and configuration I should make to parse JSON object QUESTION: I have a request(POST or GET), having one variable "data" (coming from Xcode) now data have assigned JSON object data={"method":"Auth","action":"login"} now I have a bean having exactly these two fields(i.e. method,action) now in Sp...
[ "java", "json", "spring", "spring-mvc", "spring-annotations" ]
0
1
1,046
1
0
2011-06-03T10:15:21.780000
2011-06-03T10:26:11.407000
6,225,757
6,225,783
How to reload the listView on click of a button in android?
I have created a view in which i have 1 list view and 2 buttons. The first button is for deleting the selected list view and the 2nd button is for deleting the deleted the entire data from the table. I want that if I delete the entire data from the table the list view should get refreshed an it should get reloaded. Ple...
use should use notifyDataSetChanged () method to refresh your listview... Call notifyDataSetChanged() on your Adapter see this link........ http://developer.android.com/reference/android/widget/BaseAdapter.html#notifyDataSetChanged%28%29
How to reload the listView on click of a button in android? I have created a view in which i have 1 list view and 2 buttons. The first button is for deleting the selected list view and the 2nd button is for deleting the deleted the entire data from the table. I want that if I delete the entire data from the table the l...
TITLE: How to reload the listView on click of a button in android? QUESTION: I have created a view in which i have 1 list view and 2 buttons. The first button is for deleting the selected list view and the 2nd button is for deleting the deleted the entire data from the table. I want that if I delete the entire data fr...
[ "android" ]
0
2
1,921
2
0
2011-06-03T10:15:22.627000
2011-06-03T10:18:04.730000
6,225,759
6,229,323
Serialization/Deserialization callback in classes marked as [RemoteClass]
I have been working on Flex project that uses value objects (VO) for manipulating data on client side. VOs are populated with the help of [RemoteClass] tag before a class definition. The database structure was optimized, so as a result these are tables with fields like: optionsName: "1, 2, 3, 4, 5, 6" In scope of proje...
Write that property as a setter that supports Strings and Arrays as input and converts on the fly. private var _optionsName:Array; public function get optionsName():Array { return _optionsName; } public function set optionsName(newOptionsName:*):void { if(newOptionsName is String) { _optionsName = newOptionsName.split(...
Serialization/Deserialization callback in classes marked as [RemoteClass] I have been working on Flex project that uses value objects (VO) for manipulating data on client side. VOs are populated with the help of [RemoteClass] tag before a class definition. The database structure was optimized, so as a result these are ...
TITLE: Serialization/Deserialization callback in classes marked as [RemoteClass] QUESTION: I have been working on Flex project that uses value objects (VO) for manipulating data on client side. VOs are populated with the help of [RemoteClass] tag before a class definition. The database structure was optimized, so as a...
[ "apache-flex", "actionscript", "amf" ]
0
1
309
1
0
2011-06-03T10:15:33.513000
2011-06-03T15:40:55.383000
6,225,766
6,225,932
One assembly spanning multiple files
I know that 1 namespace can span multiple assemblies and also that 1 assembly can contain multiple namespaces. However, what foxes me is how can one Assembly span multiple files. Is it done by simply creating the multiple assemblies with the same name in separate directories? Is that all there is to it?
Multi-module assemblies are not recommended. There are very specific situations where you'd want a multi-module assembly (mixing multiple languages in one assembly for example) but there are several issues with this. An assembly is the smallest portable unit of code in.NET, and contains its own versioning information (...
One assembly spanning multiple files I know that 1 namespace can span multiple assemblies and also that 1 assembly can contain multiple namespaces. However, what foxes me is how can one Assembly span multiple files. Is it done by simply creating the multiple assemblies with the same name in separate directories? Is tha...
TITLE: One assembly spanning multiple files QUESTION: I know that 1 namespace can span multiple assemblies and also that 1 assembly can contain multiple namespaces. However, what foxes me is how can one Assembly span multiple files. Is it done by simply creating the multiple assemblies with the same name in separate d...
[ "c#" ]
2
0
1,298
2
0
2011-06-03T10:16:30.573000
2011-06-03T10:31:53.793000
6,225,778
6,225,926
Starting From Scratch - What SQL database should I use with Visual Studio?
I recently got a new primary computer. On my old one, I was working with MS Visual Studio 2008 (or maybe an older version - I can't remember now). I had managed to get SQLite working with it and was in the start/middle of building an application. On the new computer, I now have MS Visual Studio 2010. I have had problem...
SQL Server would be a good choice by the sounds of what you're after. Try the express version - it's free, good for development and prototyping and integrates really well with Visual Studio. The SQL Server Management Studio tool is excellent. I use this to create the databases I need and then use Visual Studio to manag...
Starting From Scratch - What SQL database should I use with Visual Studio? I recently got a new primary computer. On my old one, I was working with MS Visual Studio 2008 (or maybe an older version - I can't remember now). I had managed to get SQLite working with it and was in the start/middle of building an application...
TITLE: Starting From Scratch - What SQL database should I use with Visual Studio? QUESTION: I recently got a new primary computer. On my old one, I was working with MS Visual Studio 2008 (or maybe an older version - I can't remember now). I had managed to get SQLite working with it and was in the start/middle of build...
[ "sql", "windows", "visual-studio-2010", "setup-project" ]
1
3
505
4
0
2011-06-03T10:17:30.740000
2011-06-03T10:31:22.510000
6,225,780
6,225,814
C# null - is it an object
When I was writing C# code a few days ago I noticed that the compiler complained that I had to cast null to a specific object. Does this mean that null is simply an uninstantiated version of the type? Or is it a singleton value of a Null class like Java (even though it has special privileges)? EDIT: an example of the c...
According to the MSDN description: The null keyword is a literal that represents a null reference, one that does not refer to any object. null is the default value of reference-type variables. Ordinary value types cannot be null. However, C# 2.0 introduced nullable value types.
C# null - is it an object When I was writing C# code a few days ago I noticed that the compiler complained that I had to cast null to a specific object. Does this mean that null is simply an uninstantiated version of the type? Or is it a singleton value of a Null class like Java (even though it has special privileges)?...
TITLE: C# null - is it an object QUESTION: When I was writing C# code a few days ago I noticed that the compiler complained that I had to cast null to a specific object. Does this mean that null is simply an uninstantiated version of the type? Or is it a singleton value of a Null class like Java (even though it has sp...
[ "c#", "language-agnostic", "null" ]
6
5
3,935
6
0
2011-06-03T10:17:49.033000
2011-06-03T10:20:52.750000
6,225,784
6,226,008
How to combine rows into one, MS SQL Server management Studio
I think this is a tricky one, How do you combine all of these rows into one? Is it possible? Maybe using temp tables, the values on the left from combo onwards are null but could contain a value. Any ideas? Let me know if you've got any questions. I would like to show just one line for this unit, i.e/ RecordNumber Reg_...
SELECT UnitData_Vehicle.Reg_String AS Registration, UnitData_Vehicle.VehID_String AS [Vendor Code], UnitData_Vehicle.Manu_String AS Make, UnitData_Vehicle.ManuNS_String AS [Make NS], SUM(CONVERT(money, UnitData_Vehicle_CompCond.Materials_String)) AS [Materials Price], SUM(CONVERT(money, UnitData_Vehicle_CompCond.Labour...
How to combine rows into one, MS SQL Server management Studio I think this is a tricky one, How do you combine all of these rows into one? Is it possible? Maybe using temp tables, the values on the left from combo onwards are null but could contain a value. Any ideas? Let me know if you've got any questions. I would li...
TITLE: How to combine rows into one, MS SQL Server management Studio QUESTION: I think this is a tricky one, How do you combine all of these rows into one? Is it possible? Maybe using temp tables, the values on the left from combo onwards are null but could contain a value. Any ideas? Let me know if you've got any que...
[ "sql", "sql-server-2005", "rows" ]
0
0
3,260
5
0
2011-06-03T10:18:25.977000
2011-06-03T10:38:48.447000
6,225,787
6,233,621
Slider (on/off) style component similar to iPad
Anyone knows of a On/off Delphi component similar to the slider control found on the iPad? TAdvSmoothSlider ( http://www.tmssoftware.com/site/advsmoothslider.asp ) is the only one I found so far, but I would prefer not to have to purchase/install the entire TMS Smooth Controls Pack. Anyone knows of a similar component?...
Could you do with something like this? unit OnOffSwitch; interface uses Classes, Controls, Windows, Messages, Graphics, Themes; type TOnOffSwitch = class(TCustomControl) private FMouseHover: Boolean; FOff: Boolean; FSliderRect: TRect; procedure SetMouseHover(Value: Boolean); procedure SetOff(Value: Boolean); procedu...
Slider (on/off) style component similar to iPad Anyone knows of a On/off Delphi component similar to the slider control found on the iPad? TAdvSmoothSlider ( http://www.tmssoftware.com/site/advsmoothslider.asp ) is the only one I found so far, but I would prefer not to have to purchase/install the entire TMS Smooth Con...
TITLE: Slider (on/off) style component similar to iPad QUESTION: Anyone knows of a On/off Delphi component similar to the slider control found on the iPad? TAdvSmoothSlider ( http://www.tmssoftware.com/site/advsmoothslider.asp ) is the only one I found so far, but I would prefer not to have to purchase/install the ent...
[ "delphi" ]
7
14
5,404
2
0
2011-06-03T10:18:31.053000
2011-06-03T23:31:58.897000
6,225,806
6,226,598
how do i use multiple certificates on the same computer?
I have two certificates on my mac: one is team agent, the other is admin. I usually use the admin one to develop, but I want also be able to use the team agent cert for ad-hoc builds. How can I achieve this? AFAIK importing both certs and priv keys does not work:( It seems that xCode only recognizes the admin cert. thx...
For every profile there are two file 1.distribution certificate and 2. provisioning profile... double click on both... next for your convenience I tried to show things graphically follow the steps 1.Open your project and select the xcode file and click on the info icon else select the file and press ALT + CMD + E 2.Nex...
how do i use multiple certificates on the same computer? I have two certificates on my mac: one is team agent, the other is admin. I usually use the admin one to develop, but I want also be able to use the team agent cert for ad-hoc builds. How can I achieve this? AFAIK importing both certs and priv keys does not work:...
TITLE: how do i use multiple certificates on the same computer? QUESTION: I have two certificates on my mac: one is team agent, the other is admin. I usually use the admin one to develop, but I want also be able to use the team agent cert for ad-hoc builds. How can I achieve this? AFAIK importing both certs and priv k...
[ "iphone", "signing" ]
0
0
85
1
0
2011-06-03T10:20:12.047000
2011-06-03T11:35:20.983000
6,225,811
6,298,391
MODx caches what it shouldn't
I'm working with MODx revo. I wrote a snippet called putBoxId with the following content: getChunk($tpl, array('id' => $id)); } return ''; I use it like this: [[~3[[!putBoxId? &tpl='boxIdUrl']] ]] (with backticks, of course), where boxIdUrl is the chunk with the following content:? &id=`[[+id]]` The problem is, for so...
The [[~3 is being cached, so your putBoxId is actually called only the first time. In Revo - any * [[ * ( tag ) can start with a! ( non-cacheable flag ). So, in your case - [[! ~3[[!putBoxId? &tpl='boxIdUrl']] ]] ( note: there's a typo here and in your original question, see comment below. this should work: [[~3]][[!pu...
MODx caches what it shouldn't I'm working with MODx revo. I wrote a snippet called putBoxId with the following content: getChunk($tpl, array('id' => $id)); } return ''; I use it like this: [[~3[[!putBoxId? &tpl='boxIdUrl']] ]] (with backticks, of course), where boxIdUrl is the chunk with the following content:? &id=`[...
TITLE: MODx caches what it shouldn't QUESTION: I'm working with MODx revo. I wrote a snippet called putBoxId with the following content: getChunk($tpl, array('id' => $id)); } return ''; I use it like this: [[~3[[!putBoxId? &tpl='boxIdUrl']] ]] (with backticks, of course), where boxIdUrl is the chunk with the followin...
[ "modx" ]
1
2
825
1
0
2011-06-03T10:20:38.270000
2011-06-09T19:48:29.813000
6,225,816
6,225,854
JavaDoc-like documentation for Objective-C in Xcode?
Possible Duplicate: How to do the documentation in objective C? Is it possible to write class/method documentation in Objective-C in a way that Xcode 4 displays them in the quick help, and/or generates a doc document from it in the style of Apple's own documentation?
Displaying it live - not that I know of. But as for generating Apple like documentation, the best I have found is appledoc which I've been using for a year now. If accepts a wide range of commenting styles including Javadoc styles and can generate very Apple like documentation which it can also install directly into yo...
JavaDoc-like documentation for Objective-C in Xcode? Possible Duplicate: How to do the documentation in objective C? Is it possible to write class/method documentation in Objective-C in a way that Xcode 4 displays them in the quick help, and/or generates a doc document from it in the style of Apple's own documentation?
TITLE: JavaDoc-like documentation for Objective-C in Xcode? QUESTION: Possible Duplicate: How to do the documentation in objective C? Is it possible to write class/method documentation in Objective-C in a way that Xcode 4 displays them in the quick help, and/or generates a doc document from it in the style of Apple's ...
[ "objective-c", "xcode", "documentation", "xcode4", "comments" ]
3
4
7,179
3
0
2011-06-03T10:20:57.523000
2011-06-03T10:24:22.093000
6,225,818
6,226,497
Execution of a SP out of turn in a transaction
SQL Server 2005 is used. Each time a new data is received it is stored and a SP is called after that which uses this data to calculate some statistics data. Storing data and calling the SP is executed in a single transaction. The SP is enlisted in the transaction like using (var transaction = session.BeginTransaction()...
NHibernate session works like unit of work. All changes are stored in the session and they are persisted together only when you commit the transaction so you cannot use your procedure before you commit them because they haven't been stored in the database yet. You must either do your computation in memory (if possible)...
Execution of a SP out of turn in a transaction SQL Server 2005 is used. Each time a new data is received it is stored and a SP is called after that which uses this data to calculate some statistics data. Storing data and calling the SP is executed in a single transaction. The SP is enlisted in the transaction like usin...
TITLE: Execution of a SP out of turn in a transaction QUESTION: SQL Server 2005 is used. Each time a new data is received it is stored and a SP is called after that which uses this data to calculate some statistics data. Storing data and calling the SP is executed in a single transaction. The SP is enlisted in the tra...
[ "sql-server", "stored-procedures", "ado.net", "transactions" ]
0
2
171
2
0
2011-06-03T10:21:23.643000
2011-06-03T11:24:29.480000
6,225,826
6,225,852
JQuery get this and one more together
I know we can choose two element like this $("element1,element2"). But how can I get this + another element? Something like $(this,"element2")
Use.add(): $(this).add('selector') // or $(this).add(otherElement)
JQuery get this and one more together I know we can choose two element like this $("element1,element2"). But how can I get this + another element? Something like $(this,"element2")
TITLE: JQuery get this and one more together QUESTION: I know we can choose two element like this $("element1,element2"). But how can I get this + another element? Something like $(this,"element2") ANSWER: Use.add(): $(this).add('selector') // or $(this).add(otherElement)
[ "jquery", "jquery-selectors" ]
2
5
57
2
0
2011-06-03T10:22:14.757000
2011-06-03T10:24:14.823000
6,225,828
6,226,831
Changing Bindng Of WCF Service?
I have a WCF service which is hosted in a windows service. For testing, I just kept the default http binding and it is now working fine. However, I want to use the tcp binding. I right clicked on app.config and Edit WCF Configuration. From the editor, I changed the endpoint bindings to netTcpBinding and mexTcpBinding. ...
Try setting debugger "ON" by using the below code in config and check the log for error details. Please share the error message written in log that will help us to identify root cause of the problem.
Changing Bindng Of WCF Service? I have a WCF service which is hosted in a windows service. For testing, I just kept the default http binding and it is now working fine. However, I want to use the tcp binding. I right clicked on app.config and Edit WCF Configuration. From the editor, I changed the endpoint bindings to n...
TITLE: Changing Bindng Of WCF Service? QUESTION: I have a WCF service which is hosted in a windows service. For testing, I just kept the default http binding and it is now working fine. However, I want to use the tcp binding. I right clicked on app.config and Edit WCF Configuration. From the editor, I changed the endp...
[ "c#", ".net", "wcf", "binding" ]
0
2
106
1
0
2011-06-03T10:22:25.170000
2011-06-03T12:00:08.677000
6,225,843
6,226,171
How to put the "build" module in python search path
After so much of hassle i build the libxml from source. I performed following steps Downloaded the lxml.tar.gz and extracted its contents Build it using python2.7 setup.py build_ext -i -I /usr/include/libxml2 --with-xslt-config=/opt/xslt/bin/xslt-config I tried going in python shell and tried import lxml. it didn't wor...
You told it to build_ext, so it just compiled it and didn't install. If you told it to install, it would install it in system-wide directory (but you need write permissions for that) or whatever directory you specify (with --home (for installing as user) or --prefix (for installing as root to non-standard directory lik...
How to put the "build" module in python search path After so much of hassle i build the libxml from source. I performed following steps Downloaded the lxml.tar.gz and extracted its contents Build it using python2.7 setup.py build_ext -i -I /usr/include/libxml2 --with-xslt-config=/opt/xslt/bin/xslt-config I tried going ...
TITLE: How to put the "build" module in python search path QUESTION: After so much of hassle i build the libxml from source. I performed following steps Downloaded the lxml.tar.gz and extracted its contents Build it using python2.7 setup.py build_ext -i -I /usr/include/libxml2 --with-xslt-config=/opt/xslt/bin/xslt-con...
[ "python", "linux" ]
0
1
147
2
0
2011-06-03T10:23:36.980000
2011-06-03T10:54:37.450000