PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
1,420,155
09/14/2009 07:36:38
23,368
09/29/2008 07:10:57
5,855
151
Is it possible to always overwrite local changes when updating from SVN?
I have a file in a Subversion repository which changes almost every time it's opened in the IDE, thus creating conflicts on almost every update. Is it possible to force SVN to always overwrite the local file with the one in the repository, even if there are local changes?
svn
null
null
null
null
null
open
Is it possible to always overwrite local changes when updating from SVN? === I have a file in a Subversion repository which changes almost every time it's opened in the IDE, thus creating conflicts on almost every update. Is it possible to force SVN to always overwrite the local file with the one in the repository, even if there are local changes?
0
8,630,251
12/25/2011 15:34:45
1,031,742
11/06/2011 01:31:46
5
0
configuring forum on a subdomain of a drupal site
I would like to ask what would be the most simple way to setup a forum on a subdomain of a site using drupal 7. I would like to create a simple forum on forum.example.com The themes and menus on both sites should look identical. On example.com I want to have a link "forum" pointing to forum.example.com All other links should point to example.com It would be great if I could manage it from one drupal installation Is this possible using domain access module or is there any better way? Thank you very much
drupal-7
subdomain
forum
null
null
05/29/2012 16:11:44
off topic
configuring forum on a subdomain of a drupal site === I would like to ask what would be the most simple way to setup a forum on a subdomain of a site using drupal 7. I would like to create a simple forum on forum.example.com The themes and menus on both sites should look identical. On example.com I want to have a link "forum" pointing to forum.example.com All other links should point to example.com It would be great if I could manage it from one drupal installation Is this possible using domain access module or is there any better way? Thank you very much
2
10,251,021
04/20/2012 17:47:00
1,342,164
04/18/2012 18:04:14
23
0
How can I wrap a progress dialog around my code?
Is there a way I can have a progress dialog appear when my app is first launched so it goes from 0% to 100% then closes after the wifi connection has been established? Or any other kind of progress bar just to show the end user it is connecting? import java.util.List; import android.app.Activity; import android.os.Bundle; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiManager; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; public class TestActivity extends Activity { /** Called when the activity is first created. * @return */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button OffWifi = (Button)findViewById(R.id.offwifi); OffWifi.setOnClickListener(new OnClickListener() { public void onClick(View v) { WifiManager wifiManager = (WifiManager)getBaseContext().getSystemService(Context.WIFI_SERVICE); wifiManager.setWifiEnabled(false); } }); TextView tv= (TextView) findViewById(R.id.tv); WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); WifiConfiguration wc = new WifiConfiguration(); wc.SSID = "\"Test\""; //IMP! This should be in Quotes!! wc.hiddenSSID = true; wc.status = WifiConfiguration.Status.ENABLED; wc.priority = 10; wc.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK); wc.allowedProtocols.set(WifiConfiguration.Protocol.RSN); wc.allowedProtocols.set(WifiConfiguration.Protocol.WPA); wc.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN); wc.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED); wc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP); wc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP); wc.preSharedKey = "\"Password\""; WifiManager wifiManag = (WifiManager) this.getSystemService(WIFI_SERVICE); boolean res1 = wifiManag.setWifiEnabled(true); int res = wifi.addNetwork(checkPreviousConfiguration(wc)); Log.d("WifiPreference", "add Network returned " + res ); boolean es = wifi.saveConfiguration(); Log.d("WifiPreference", "saveConfiguration returned " + es ); boolean b = wifi.enableNetwork(res, true); Log.d("WifiPreference", "enableNetwork returned " + b ); ConnectivityManager connec = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); if (connec != null && (connec.getNetworkInfo(1).getState() == NetworkInfo.State.CONNECTED) ||(connec.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTED)){ tv.setText("You are now connected! " + "Version 1.1"); }else if (connec.getNetworkInfo(0).getState() == NetworkInfo.State.DISCONNECTED || connec.getNetworkInfo(1).getState() == NetworkInfo.State.DISCONNECTED ) { tv.setText("The was an error connecting, please try again."); } } public WifiConfiguration checkPreviousConfiguration(WifiConfiguration wc) { WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); List<WifiConfiguration> configs = wifi.getConfiguredNetworks(); for(WifiConfiguration config : configs) { if(config.SSID.equals(wc.SSID)) return config; } return wc; } }
java
android
null
null
null
04/20/2012 19:57:04
too localized
How can I wrap a progress dialog around my code? === Is there a way I can have a progress dialog appear when my app is first launched so it goes from 0% to 100% then closes after the wifi connection has been established? Or any other kind of progress bar just to show the end user it is connecting? import java.util.List; import android.app.Activity; import android.os.Bundle; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiManager; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; public class TestActivity extends Activity { /** Called when the activity is first created. * @return */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button OffWifi = (Button)findViewById(R.id.offwifi); OffWifi.setOnClickListener(new OnClickListener() { public void onClick(View v) { WifiManager wifiManager = (WifiManager)getBaseContext().getSystemService(Context.WIFI_SERVICE); wifiManager.setWifiEnabled(false); } }); TextView tv= (TextView) findViewById(R.id.tv); WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); WifiConfiguration wc = new WifiConfiguration(); wc.SSID = "\"Test\""; //IMP! This should be in Quotes!! wc.hiddenSSID = true; wc.status = WifiConfiguration.Status.ENABLED; wc.priority = 10; wc.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK); wc.allowedProtocols.set(WifiConfiguration.Protocol.RSN); wc.allowedProtocols.set(WifiConfiguration.Protocol.WPA); wc.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN); wc.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED); wc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP); wc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP); wc.preSharedKey = "\"Password\""; WifiManager wifiManag = (WifiManager) this.getSystemService(WIFI_SERVICE); boolean res1 = wifiManag.setWifiEnabled(true); int res = wifi.addNetwork(checkPreviousConfiguration(wc)); Log.d("WifiPreference", "add Network returned " + res ); boolean es = wifi.saveConfiguration(); Log.d("WifiPreference", "saveConfiguration returned " + es ); boolean b = wifi.enableNetwork(res, true); Log.d("WifiPreference", "enableNetwork returned " + b ); ConnectivityManager connec = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); if (connec != null && (connec.getNetworkInfo(1).getState() == NetworkInfo.State.CONNECTED) ||(connec.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTED)){ tv.setText("You are now connected! " + "Version 1.1"); }else if (connec.getNetworkInfo(0).getState() == NetworkInfo.State.DISCONNECTED || connec.getNetworkInfo(1).getState() == NetworkInfo.State.DISCONNECTED ) { tv.setText("The was an error connecting, please try again."); } } public WifiConfiguration checkPreviousConfiguration(WifiConfiguration wc) { WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); List<WifiConfiguration> configs = wifi.getConfiguredNetworks(); for(WifiConfiguration config : configs) { if(config.SSID.equals(wc.SSID)) return config; } return wc; } }
3
9,367,884
02/20/2012 20:21:21
90,291
04/13/2009 16:11:16
267
15
Bug in Mono C# compiler's implementation of yield?
This code causes an internal compiler error at the if(false) statement, using the 2.10.8 dmcs as well as MonoTouch. Is this known? (This may be a bug report, but I could be doing something lame.) using System; using System.Collections; class X { static int Main() { foreach(var i in GetAll()) { } return 0; } static IEnumerable GetAll() { yield return 1; if (false) yield return 2; } }
c#
mono
monotouch
dmcs
null
02/21/2012 02:14:10
not constructive
Bug in Mono C# compiler's implementation of yield? === This code causes an internal compiler error at the if(false) statement, using the 2.10.8 dmcs as well as MonoTouch. Is this known? (This may be a bug report, but I could be doing something lame.) using System; using System.Collections; class X { static int Main() { foreach(var i in GetAll()) { } return 0; } static IEnumerable GetAll() { yield return 1; if (false) yield return 2; } }
4
6,499,569
06/27/2011 22:14:34
194,076
10/21/2009 19:48:10
439
26
call method after dot, not in parenthsis
Assume I have a function: Protected Sub UploadFile(file As String) ....... End Sub Then I can do the follwing UploadFile(file) But I would like to do this: file.UploadFile() Looks like Im missing logic in here, but still - is it possible to make dot-like notation?
asp.net
vb.net
null
null
null
null
open
call method after dot, not in parenthsis === Assume I have a function: Protected Sub UploadFile(file As String) ....... End Sub Then I can do the follwing UploadFile(file) But I would like to do this: file.UploadFile() Looks like Im missing logic in here, but still - is it possible to make dot-like notation?
0
1,060,230
06/29/2009 20:08:16
21,155
09/23/2008 14:37:57
443
23
Summarizing data by multiple columns
My boss is asking me to code a report that has the following components: * A pie chart of employee count by state * A pie chart of employee count by age bracket (10 year brackets) * A pie chart of employee length of service (5 year brackets) * A pie chart of employee Male/Female breakdown * A pie chart of employee count by salary band (computer generates brackets). There may be others. I know I can do this by writting 5 different sql statements. However it seems like this would generate 5 table scans for one report. I could switch gears and do one table scan and analyse each record on the front end and increment counters and probably accomplish this with one-pass. Which way would the collective wisdom at stackoverflow go on this? Is there a way to accomplish this with the CUBE or ROLL UP clauses in T-SQL?
sql-server
c#
null
null
null
null
open
Summarizing data by multiple columns === My boss is asking me to code a report that has the following components: * A pie chart of employee count by state * A pie chart of employee count by age bracket (10 year brackets) * A pie chart of employee length of service (5 year brackets) * A pie chart of employee Male/Female breakdown * A pie chart of employee count by salary band (computer generates brackets). There may be others. I know I can do this by writting 5 different sql statements. However it seems like this would generate 5 table scans for one report. I could switch gears and do one table scan and analyse each record on the front end and increment counters and probably accomplish this with one-pass. Which way would the collective wisdom at stackoverflow go on this? Is there a way to accomplish this with the CUBE or ROLL UP clauses in T-SQL?
0
3,910,625
10/11/2010 23:22:06
472,777
10/11/2010 23:22:06
1
0
Which language has better memory management among C,C++,Java?
I just wanted to know which language has better memory management among C,C++ and Java,why is it so and it is based on what criteria? I know that Java uses garbage collection for freeing memory and C uses DMA functions.Does this make java better at memory management since it's handled automatically? I do not know C++ so I don't have much idea there,though I know it uses destructors and delete. Any suggestions/ideas will be grately appreciated.
memory-management
null
null
null
null
10/12/2010 00:00:21
not constructive
Which language has better memory management among C,C++,Java? === I just wanted to know which language has better memory management among C,C++ and Java,why is it so and it is based on what criteria? I know that Java uses garbage collection for freeing memory and C uses DMA functions.Does this make java better at memory management since it's handled automatically? I do not know C++ so I don't have much idea there,though I know it uses destructors and delete. Any suggestions/ideas will be grately appreciated.
4
6,733,178
07/18/2011 12:53:43
33,225
10/31/2008 21:47:27
17,392
558
Tool to visualise how HTTP traffic is split into TCP packets?
I have a webserver and I’m trying to tune its behaviour. For this purpose, it would be nice to be able to see exactly how the HTTP traffic is split into individual TCP packets. Is there a tool that can visualise this nicely?
http
tcp
visualization
null
null
null
open
Tool to visualise how HTTP traffic is split into TCP packets? === I have a webserver and I’m trying to tune its behaviour. For this purpose, it would be nice to be able to see exactly how the HTTP traffic is split into individual TCP packets. Is there a tool that can visualise this nicely?
0
10,678,736
05/21/2012 01:53:02
1,191,216
02/05/2012 21:58:57
47
0
Triple Boot 2 Linux Distros With A Win 7 Installation
There are a couple of Linux distros I'd like to install alongside my Windows 7 installation. I initially installed Backtrack side-by-side my Windows install successfully with defaulted settings (foolishly, I know), which automatically allocated 80 GB of my available Windows partition to that distro. It also installed Grub. I can live with that so long as it would be possible to take some of that allocated 80 GB towards another Linux distro, Matriux so that I could triple boot. However, after installing Backtrack, Grub will no longer allow me to boot from my CD media. It starts to read the disc, but then Grub kicks in and wants me to choose between my Windows 7 OS and my Backtrack distro. Now, I've scoured the web trying to find a solution and the following suggestions are repeatedly stated but will not work for me. 1) Replace CD/DVD drive: I know my CD/DVD drive is fine, I can load any disc without fail in any given, running OS/Distribution environment. I have loaded Matriux in a virtual environment from the CD as well which leads me to the second suggestion... 2) It's got to be a bad disc/burned iso: No, because I have booted from my burned disc successfully in the virtual environment and even successfully installed it in this virtual environment. The disc/iso I'm using is fine. 3) Check BIOS to make sure disc is default boot method: I've done this, and I've even selected to immediately boot from the disc drive as well from within my BIOS settings. No dice. I feel like... if Grub wasn't managing my boot options, everything would be fine. I know I can restore the Windows boot loader by repairing it with a Windows installation disc, but I believe it also removes my Backtrack distro (given the circumstances, it might actually be the better choice...), but I was hoping there was a way I could just proceed on without any further complications and just install my Matriux distribution with Backtrack and Windows 7. Any advice you guys can give would be greatly appreciated... thank you :)
linux
bootloader
grub
null
null
05/21/2012 16:49:40
off topic
Triple Boot 2 Linux Distros With A Win 7 Installation === There are a couple of Linux distros I'd like to install alongside my Windows 7 installation. I initially installed Backtrack side-by-side my Windows install successfully with defaulted settings (foolishly, I know), which automatically allocated 80 GB of my available Windows partition to that distro. It also installed Grub. I can live with that so long as it would be possible to take some of that allocated 80 GB towards another Linux distro, Matriux so that I could triple boot. However, after installing Backtrack, Grub will no longer allow me to boot from my CD media. It starts to read the disc, but then Grub kicks in and wants me to choose between my Windows 7 OS and my Backtrack distro. Now, I've scoured the web trying to find a solution and the following suggestions are repeatedly stated but will not work for me. 1) Replace CD/DVD drive: I know my CD/DVD drive is fine, I can load any disc without fail in any given, running OS/Distribution environment. I have loaded Matriux in a virtual environment from the CD as well which leads me to the second suggestion... 2) It's got to be a bad disc/burned iso: No, because I have booted from my burned disc successfully in the virtual environment and even successfully installed it in this virtual environment. The disc/iso I'm using is fine. 3) Check BIOS to make sure disc is default boot method: I've done this, and I've even selected to immediately boot from the disc drive as well from within my BIOS settings. No dice. I feel like... if Grub wasn't managing my boot options, everything would be fine. I know I can restore the Windows boot loader by repairing it with a Windows installation disc, but I believe it also removes my Backtrack distro (given the circumstances, it might actually be the better choice...), but I was hoping there was a way I could just proceed on without any further complications and just install my Matriux distribution with Backtrack and Windows 7. Any advice you guys can give would be greatly appreciated... thank you :)
2
7,860,882
10/22/2011 16:24:10
702,740
04/11/2011 18:50:20
27
0
mysql join/union select query?
running mysql/linux. trying to get the following.. clsApp bkApp facApp colA svrScriptA | clScriptA svrScriptA1 | clScriptA1 srvScript | clScript colB svrScriptB | clScriptB svrScriptB1 | clScriptB1 srvScript | clScript the idea is to be able to get the scriptapps for the client/server for the class/book/faculty for each college... the following selects get the data for a college for the server and client for the class/book/faculty, but I'm not sure how to "join" the selects/results to get the data I'm trying to achieve like in the above section. the app needs to ultimately be able to do this for all colleges in the universityTBL for the "ID". the tbls and the data/selects/links are listed below. thoughts/comments?? basic selects:: mysql> select BaseScriptName,ClientServerTypeID,BaseItemID,b.BaseScriptNameID,sBaseType,itemType,ScriptType from BaseScriptNameTBL as b join ServerSideScriptBaseTypeTBL as s on s.ID=b.BaseItemID join ParseScriptTBL as p on p.BaseScriptNameID=b.BaseScriptNameID join ParseScriptTypeTBL as p1 on p1.pTypeID=s.itemType where b.ClientServerTypeID=2 and p.CollegeID=90; +----------------+--------------------+------------+------------------+-------------+----------+------------+ | BaseScriptName | ClientServerTypeID | BaseItemID | BaseScriptNameID | sBaseType | itemType | ScriptType | +----------------+--------------------+------------+------------------+-------------+----------+------------+ | asuclient | 2 | 6 | 1 | homegrownJa | 1 | Course | | Default | 2 | 22 | 6 | Default | 2 | Faculty | | Default | 2 | 23 | 7 | Default | 3 | Book | +----------------+--------------------+------------+------------------+-------------+----------+------------+ 3 rows in set (0.01 sec) mysql> select BaseScriptName,ClientServerTypeID,BaseItemID,b.BaseScriptNameID,cBaseType,itemType,ScriptType from BaseScriptNameTBL as b join ClientSideScriptBaseTypeTBL as s on s.ID=b.BaseItemID join ParseScriptTBL as p on p.BaseScriptNameID=b.BaseScriptNameID join ParseScriptTypeTBL as p1 on p1.pTypeID=s.itemType where b.ClientServerTypeID=1 and CollegeID=90; +----------------+--------------------+------------+------------------+-----------+----------+------------+ | BaseScriptName | ClientServerTypeID | BaseItemID | BaseScriptNameID | cBaseType | itemType | ScriptType | +----------------+--------------------+------------+------------------+-----------+----------+------------+ | Default | 1 | 21 | 2 | Default | 1 | Course | | Default | 1 | 22 | 3 | Default | 2 | Faculty | | Default | 1 | 23 | 4 | Default | 3 | Book | +------------+-----------+---------+------------+-----------+----------+------------+ 3 rows in set (0.00 sec) links::: ParseScriptTBL.CollegeID=universityTBL.ID ParseScriptTBL.BaseScriptNameID=BaseScriptNameTBL.BaseScriptNameID if BaseScriptNameTBL.ClientServerTypeID=1 BaseScriptNameTBL.BaseItemID=ClientSideScriptBaseTypeTBL.ID elseif BaseScriptNameTBL.ClientServerTypeID=2 BaseScriptNameTBL.BaseItemID=ServerSideScriptBaseTypeTBL.ID for either ClientSideScriptBaseTypeTBL/ServerSideScriptBaseTypeTBL ServerSideScriptBaseTypeTBL.itemType=ParseScriptTypeTBL.ID CREATE TABLE `ServerSideScriptBaseTypeTBL` ( `sBaseType` varchar(50) NOT NULL DEFAULT '', `itemType` int(5) NOT NULL DEFAULT 0, `serverBaseItemID` int(5) unsigned DEFAULT 0, `ID` int(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`ID`), KEY `serverBaseItemID` (`serverBaseItemID`) ) CREATE TABLE `ClientSideScriptBaseTypeTBL` ( `cBaseType` varchar(50) NOT NULL DEFAULT '', `itemType` int(5) NOT NULL DEFAULT 0, `clientBaseItemID` int(5) unsigned DEFAULT 0, `ID` int(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`ID`), KEY `clientBaseItemID` (`clientBaseItemID`) ) CREATE TABLE `ParseScriptTBL` ( `BaseScriptNameID` int(5) DEFAULT 0, `CollegeID` int(10) NOT NULL DEFAULT '0', `ScriptID` int(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`ScriptID`), UNIQUE KEY `ClientServerTypeID` (`BaseScriptNameID`,`CollegeID`), KEY `ParseScriptTBL_ScriptID` (`ScriptID`) ) CREATE TABLE `universityTBL` ( `name` varchar(100) DEFAULT NULL, `ID` int(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`ID`), UNIQUE KEY `name` (`name`) ) CREATE TABLE `BaseScriptNameTBL` ( `BaseScriptName` varchar(100) DEFAULT NULL, `ClientServerTypeID` int(5) unsigned DEFAULT NULL, `BaseItemID` int(5) unsigned DEFAULT NULL, `BaseScriptNameID` int(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`BaseScriptNameID`) ) CREATE TABLE `ParseScriptTypeTBL` ( `ScriptType` varchar(50) NOT NULL DEFAULT '', `pTypeID` int(1) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`pTypeID`) ) ============================================== tbl selects mysql> select * from BaseScriptNameTBL; +----------------+--------------------+------------+------------------+ | BaseScriptName | ClientServerTypeID | BaseItemID | BaseScriptNameID | +----------------+--------------------+------------+------------------+ | asuclient | 2 | 6 | 1 | | Default | 1 | 21 | 2 | | Default | 1 | 22 | 3 | | Default | 1 | 23 | 4 | | Default | 2 | 21 | 5 | | Default | 2 | 22 | 6 | | Default | 2 | 23 | 7 | +----------------+--------------------+------------+------------------+ mysql> select * from universityTBL where ID=90; +--------------------------+----+ | name | ID | +--------------------------+----+ | Arizona State University | 90 | +--------------------------+----+ 1 row in set (0.05 sec) mysql> select * from ParseScriptTBL where CollegeID=90; +------------------+-----------+--------------------+--------+----------+----------+ | BaseScriptNameID | CollegeID | parentAppAttribute | enable | required | ScriptID | +------------------+-----------+--------------------+--------+----------+----------+ | 2 | 90 | NULL | 0 | 0 | 10 | | 1 | 90 | NULL | 0 | 0 | 11 | | 3 | 90 | NULL | 0 | 0 | 12 | | 6 | 90 | NULL | 0 | 0 | 13 | | 4 | 90 | NULL | 0 | 0 | 14 | | 7 | 90 | NULL | 0 | 0 | 15 | +------------------+-----------+--------------------+--------+----------+----------+ 6 rows in set (0.00 sec) mysql> select * from ServerSideScriptBaseTypeTBL; +-------------+----------+------------------+----+ | sBaseType | itemType | serverBaseItemID | ID | +-------------+----------+------------------+----+ | psoft | 1 | 1 | 1 | | banner | 1 | 2 | 2 | | sungard | 1 | 3 | 3 | | webadvisor | 1 | 4 | 4 | | homegrownPy | 1 | 5 | 5 | | homegrownJa | 1 | 6 | 6 | | ePOS | 3 | 7 | 7 | | ePOS-1 | 3 | 8 | 8 | | Verba | 3 | 9 | 9 | | Barnes | 3 | 10 | 10 | | Barnes-1 | 3 | 11 | 11 | | Follett | 3 | 12 | 12 | | Follett-1 | 3 | 13 | 13 | | mbsBooks | 3 | 14 | 14 | | mbsBooks-1 | 3 | 15 | 15 | | nebooks | 3 | 16 | 16 | | nebooks-1 | 3 | 17 | 17 | | ratek | 3 | 18 | 18 | | homegrownPy | 3 | 19 | 19 | | homegrownJa | 3 | 20 | 20 | | Default | 1 | 21 | 21 | | Default | 2 | 22 | 22 | | Default | 3 | 23 | 23 | +-------------+----------+------------------+----+ 23 rows in set (0.04 sec) mysql> select * from ClientSideScriptBaseTypeTBL; +-------------+----------+------------------+----+ | cBaseType | itemType | clientBaseItemID | ID | +-------------+----------+------------------+----+ | psoft | 1 | 1 | 1 | | banner | 1 | 2 | 2 | | sungard | 1 | 3 | 3 | | webadvisor | 1 | 4 | 4 | | homegrownPy | 1 | 5 | 5 | | homegrownJa | 1 | 6 | 6 | | ePOS | 3 | 7 | 7 | | ePOS-1 | 3 | 8 | 8 | | Verba | 3 | 9 | 9 | | Barnes | 3 | 10 | 10 | | Barnes-1 | 3 | 11 | 11 | | Follett | 3 | 12 | 12 | | Follett-1 | 3 | 13 | 13 | | mbsBooks | 3 | 14 | 14 | | mbsBooks-1 | 3 | 15 | 15 | | nebooks | 3 | 16 | 16 | | nebooks-1 | 3 | 17 | 17 | | ratek | 3 | 18 | 18 | | homegrownPy | 3 | 19 | 19 | | homegrownJa | 3 | 20 | 20 | | Default | 1 | 21 | 21 | | Default | 2 | 22 | 22 | | Default | 3 | 23 | 23 | +-------------+----------+------------------+----+ 23 rows in set (0.06 sec) mysql> select * from ParseScriptTypeTBL; +------------+---------+ | ScriptType | pTypeID | +------------+---------+ | Course | 1 | | Faculty | 2 | | Book | 3 | +------------+---------+ 3 rows in set (0.00 sec)
mysql
select
join
union
null
10/26/2011 00:47:57
too localized
mysql join/union select query? === running mysql/linux. trying to get the following.. clsApp bkApp facApp colA svrScriptA | clScriptA svrScriptA1 | clScriptA1 srvScript | clScript colB svrScriptB | clScriptB svrScriptB1 | clScriptB1 srvScript | clScript the idea is to be able to get the scriptapps for the client/server for the class/book/faculty for each college... the following selects get the data for a college for the server and client for the class/book/faculty, but I'm not sure how to "join" the selects/results to get the data I'm trying to achieve like in the above section. the app needs to ultimately be able to do this for all colleges in the universityTBL for the "ID". the tbls and the data/selects/links are listed below. thoughts/comments?? basic selects:: mysql> select BaseScriptName,ClientServerTypeID,BaseItemID,b.BaseScriptNameID,sBaseType,itemType,ScriptType from BaseScriptNameTBL as b join ServerSideScriptBaseTypeTBL as s on s.ID=b.BaseItemID join ParseScriptTBL as p on p.BaseScriptNameID=b.BaseScriptNameID join ParseScriptTypeTBL as p1 on p1.pTypeID=s.itemType where b.ClientServerTypeID=2 and p.CollegeID=90; +----------------+--------------------+------------+------------------+-------------+----------+------------+ | BaseScriptName | ClientServerTypeID | BaseItemID | BaseScriptNameID | sBaseType | itemType | ScriptType | +----------------+--------------------+------------+------------------+-------------+----------+------------+ | asuclient | 2 | 6 | 1 | homegrownJa | 1 | Course | | Default | 2 | 22 | 6 | Default | 2 | Faculty | | Default | 2 | 23 | 7 | Default | 3 | Book | +----------------+--------------------+------------+------------------+-------------+----------+------------+ 3 rows in set (0.01 sec) mysql> select BaseScriptName,ClientServerTypeID,BaseItemID,b.BaseScriptNameID,cBaseType,itemType,ScriptType from BaseScriptNameTBL as b join ClientSideScriptBaseTypeTBL as s on s.ID=b.BaseItemID join ParseScriptTBL as p on p.BaseScriptNameID=b.BaseScriptNameID join ParseScriptTypeTBL as p1 on p1.pTypeID=s.itemType where b.ClientServerTypeID=1 and CollegeID=90; +----------------+--------------------+------------+------------------+-----------+----------+------------+ | BaseScriptName | ClientServerTypeID | BaseItemID | BaseScriptNameID | cBaseType | itemType | ScriptType | +----------------+--------------------+------------+------------------+-----------+----------+------------+ | Default | 1 | 21 | 2 | Default | 1 | Course | | Default | 1 | 22 | 3 | Default | 2 | Faculty | | Default | 1 | 23 | 4 | Default | 3 | Book | +------------+-----------+---------+------------+-----------+----------+------------+ 3 rows in set (0.00 sec) links::: ParseScriptTBL.CollegeID=universityTBL.ID ParseScriptTBL.BaseScriptNameID=BaseScriptNameTBL.BaseScriptNameID if BaseScriptNameTBL.ClientServerTypeID=1 BaseScriptNameTBL.BaseItemID=ClientSideScriptBaseTypeTBL.ID elseif BaseScriptNameTBL.ClientServerTypeID=2 BaseScriptNameTBL.BaseItemID=ServerSideScriptBaseTypeTBL.ID for either ClientSideScriptBaseTypeTBL/ServerSideScriptBaseTypeTBL ServerSideScriptBaseTypeTBL.itemType=ParseScriptTypeTBL.ID CREATE TABLE `ServerSideScriptBaseTypeTBL` ( `sBaseType` varchar(50) NOT NULL DEFAULT '', `itemType` int(5) NOT NULL DEFAULT 0, `serverBaseItemID` int(5) unsigned DEFAULT 0, `ID` int(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`ID`), KEY `serverBaseItemID` (`serverBaseItemID`) ) CREATE TABLE `ClientSideScriptBaseTypeTBL` ( `cBaseType` varchar(50) NOT NULL DEFAULT '', `itemType` int(5) NOT NULL DEFAULT 0, `clientBaseItemID` int(5) unsigned DEFAULT 0, `ID` int(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`ID`), KEY `clientBaseItemID` (`clientBaseItemID`) ) CREATE TABLE `ParseScriptTBL` ( `BaseScriptNameID` int(5) DEFAULT 0, `CollegeID` int(10) NOT NULL DEFAULT '0', `ScriptID` int(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`ScriptID`), UNIQUE KEY `ClientServerTypeID` (`BaseScriptNameID`,`CollegeID`), KEY `ParseScriptTBL_ScriptID` (`ScriptID`) ) CREATE TABLE `universityTBL` ( `name` varchar(100) DEFAULT NULL, `ID` int(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`ID`), UNIQUE KEY `name` (`name`) ) CREATE TABLE `BaseScriptNameTBL` ( `BaseScriptName` varchar(100) DEFAULT NULL, `ClientServerTypeID` int(5) unsigned DEFAULT NULL, `BaseItemID` int(5) unsigned DEFAULT NULL, `BaseScriptNameID` int(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`BaseScriptNameID`) ) CREATE TABLE `ParseScriptTypeTBL` ( `ScriptType` varchar(50) NOT NULL DEFAULT '', `pTypeID` int(1) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`pTypeID`) ) ============================================== tbl selects mysql> select * from BaseScriptNameTBL; +----------------+--------------------+------------+------------------+ | BaseScriptName | ClientServerTypeID | BaseItemID | BaseScriptNameID | +----------------+--------------------+------------+------------------+ | asuclient | 2 | 6 | 1 | | Default | 1 | 21 | 2 | | Default | 1 | 22 | 3 | | Default | 1 | 23 | 4 | | Default | 2 | 21 | 5 | | Default | 2 | 22 | 6 | | Default | 2 | 23 | 7 | +----------------+--------------------+------------+------------------+ mysql> select * from universityTBL where ID=90; +--------------------------+----+ | name | ID | +--------------------------+----+ | Arizona State University | 90 | +--------------------------+----+ 1 row in set (0.05 sec) mysql> select * from ParseScriptTBL where CollegeID=90; +------------------+-----------+--------------------+--------+----------+----------+ | BaseScriptNameID | CollegeID | parentAppAttribute | enable | required | ScriptID | +------------------+-----------+--------------------+--------+----------+----------+ | 2 | 90 | NULL | 0 | 0 | 10 | | 1 | 90 | NULL | 0 | 0 | 11 | | 3 | 90 | NULL | 0 | 0 | 12 | | 6 | 90 | NULL | 0 | 0 | 13 | | 4 | 90 | NULL | 0 | 0 | 14 | | 7 | 90 | NULL | 0 | 0 | 15 | +------------------+-----------+--------------------+--------+----------+----------+ 6 rows in set (0.00 sec) mysql> select * from ServerSideScriptBaseTypeTBL; +-------------+----------+------------------+----+ | sBaseType | itemType | serverBaseItemID | ID | +-------------+----------+------------------+----+ | psoft | 1 | 1 | 1 | | banner | 1 | 2 | 2 | | sungard | 1 | 3 | 3 | | webadvisor | 1 | 4 | 4 | | homegrownPy | 1 | 5 | 5 | | homegrownJa | 1 | 6 | 6 | | ePOS | 3 | 7 | 7 | | ePOS-1 | 3 | 8 | 8 | | Verba | 3 | 9 | 9 | | Barnes | 3 | 10 | 10 | | Barnes-1 | 3 | 11 | 11 | | Follett | 3 | 12 | 12 | | Follett-1 | 3 | 13 | 13 | | mbsBooks | 3 | 14 | 14 | | mbsBooks-1 | 3 | 15 | 15 | | nebooks | 3 | 16 | 16 | | nebooks-1 | 3 | 17 | 17 | | ratek | 3 | 18 | 18 | | homegrownPy | 3 | 19 | 19 | | homegrownJa | 3 | 20 | 20 | | Default | 1 | 21 | 21 | | Default | 2 | 22 | 22 | | Default | 3 | 23 | 23 | +-------------+----------+------------------+----+ 23 rows in set (0.04 sec) mysql> select * from ClientSideScriptBaseTypeTBL; +-------------+----------+------------------+----+ | cBaseType | itemType | clientBaseItemID | ID | +-------------+----------+------------------+----+ | psoft | 1 | 1 | 1 | | banner | 1 | 2 | 2 | | sungard | 1 | 3 | 3 | | webadvisor | 1 | 4 | 4 | | homegrownPy | 1 | 5 | 5 | | homegrownJa | 1 | 6 | 6 | | ePOS | 3 | 7 | 7 | | ePOS-1 | 3 | 8 | 8 | | Verba | 3 | 9 | 9 | | Barnes | 3 | 10 | 10 | | Barnes-1 | 3 | 11 | 11 | | Follett | 3 | 12 | 12 | | Follett-1 | 3 | 13 | 13 | | mbsBooks | 3 | 14 | 14 | | mbsBooks-1 | 3 | 15 | 15 | | nebooks | 3 | 16 | 16 | | nebooks-1 | 3 | 17 | 17 | | ratek | 3 | 18 | 18 | | homegrownPy | 3 | 19 | 19 | | homegrownJa | 3 | 20 | 20 | | Default | 1 | 21 | 21 | | Default | 2 | 22 | 22 | | Default | 3 | 23 | 23 | +-------------+----------+------------------+----+ 23 rows in set (0.06 sec) mysql> select * from ParseScriptTypeTBL; +------------+---------+ | ScriptType | pTypeID | +------------+---------+ | Course | 1 | | Faculty | 2 | | Book | 3 | +------------+---------+ 3 rows in set (0.00 sec)
3
2,162,594
01/29/2010 14:39:32
261,874
01/29/2010 14:25:19
1
0
Iphone checking subfolder existence, if exist delele subfolder, else and create subfolder
I'm new in Iphone programing, I need code to: - check if a specific target subfolder exist in the document folder ? - if target subfolder exist in document folder, I want to delete target subfolder - if target subfolder does not exist in document folder, I want to create target subfolder in document folder Thank's in advance for your help !
delete
subfolder
existence
null
null
null
open
Iphone checking subfolder existence, if exist delele subfolder, else and create subfolder === I'm new in Iphone programing, I need code to: - check if a specific target subfolder exist in the document folder ? - if target subfolder exist in document folder, I want to delete target subfolder - if target subfolder does not exist in document folder, I want to create target subfolder in document folder Thank's in advance for your help !
0
10,700,942
05/22/2012 11:15:50
655,261
03/11/2011 11:33:42
29
6
muParser and VC6
HI I am trying to use muParser with a legacy MFC application written in VC++6, migrating the code to a later version is not an option. Has anyone had any success using muParser in this environment. any example source code would be great.
c++
mfc
vc6
equations
null
null
open
muParser and VC6 === HI I am trying to use muParser with a legacy MFC application written in VC++6, migrating the code to a later version is not an option. Has anyone had any success using muParser in this environment. any example source code would be great.
0
7,468,854
09/19/2011 09:30:42
948,314
09/16/2011 07:21:30
1
0
How to create back button in table view in iphone
hi here i want to create back button and place in table view page. that is i need when i press button it will goes next page of tableview page from one UIView subclass to table view control class. here i need to create navigation controller with back button in iPhone. can anyone help me. thanks in advance.
iphone
sdk
null
null
null
null
open
How to create back button in table view in iphone === hi here i want to create back button and place in table view page. that is i need when i press button it will goes next page of tableview page from one UIView subclass to table view control class. here i need to create navigation controller with back button in iPhone. can anyone help me. thanks in advance.
0
4,824,132
01/28/2011 02:04:57
511,659
11/18/2010 04:33:39
74
2
Where to put this block of script so that this slideshow can move automatically?
I asked a question before on how to make the [jQuery Blinds slideshow][1] move automatically and somebody answered on this page (the one with 12 votes): [http://stackoverflow.com/questions/4273617/is-there-a-way-to-make-this-slideshow-move-automatically][2] Seems like the code is working for most people but I can't get it to work for me. I used the original demo file and placed the code at the very bottom of jquery.blinds-0.9.js, right after "})(jQuery);" but still the slideshow isn't moving. What am I doing wrong? I checked the class names and they are correct. This is that block of script: var SlideChanger = function(seconds_each) { var index = -1; // on the first cycle, index will be set to zero below var maxindex = ($(".change_link").length) - 1; // how many total slides are there (count the slide buttons) var timer = function() { // this is the function returned by SlideChanger var logic = function() { // this is an inner function which uses the // enclosed values (index and maxindex) to cycle through the slides if (index == maxindex) index = 0; // reset to first slide else index++; // goto next slide, set index to zero on first cycle $('.slideshow').blinds_change(index); // this is what changes the slide setTimeout(logic, 1000 * seconds_each); // schedule ourself to run in the future } logic(); // get the ball rolling } return timer; // give caller the function } SlideChanger(5)(); // get the function at five seconds per slide and run it [1]: http://www.littlewebthings.com/projects/blinds/ [2]: http://stackoverflow.com/questions/4273617/is-there-a-way-to-make-this-slideshow-move-automatically
javascript
jquery
slideshow
null
null
null
open
Where to put this block of script so that this slideshow can move automatically? === I asked a question before on how to make the [jQuery Blinds slideshow][1] move automatically and somebody answered on this page (the one with 12 votes): [http://stackoverflow.com/questions/4273617/is-there-a-way-to-make-this-slideshow-move-automatically][2] Seems like the code is working for most people but I can't get it to work for me. I used the original demo file and placed the code at the very bottom of jquery.blinds-0.9.js, right after "})(jQuery);" but still the slideshow isn't moving. What am I doing wrong? I checked the class names and they are correct. This is that block of script: var SlideChanger = function(seconds_each) { var index = -1; // on the first cycle, index will be set to zero below var maxindex = ($(".change_link").length) - 1; // how many total slides are there (count the slide buttons) var timer = function() { // this is the function returned by SlideChanger var logic = function() { // this is an inner function which uses the // enclosed values (index and maxindex) to cycle through the slides if (index == maxindex) index = 0; // reset to first slide else index++; // goto next slide, set index to zero on first cycle $('.slideshow').blinds_change(index); // this is what changes the slide setTimeout(logic, 1000 * seconds_each); // schedule ourself to run in the future } logic(); // get the ball rolling } return timer; // give caller the function } SlideChanger(5)(); // get the function at five seconds per slide and run it [1]: http://www.littlewebthings.com/projects/blinds/ [2]: http://stackoverflow.com/questions/4273617/is-there-a-way-to-make-this-slideshow-move-automatically
0
9,186,959
02/08/2012 02:20:04
1,196,146
02/08/2012 02:15:32
1
0
What things that iOS developer have to know first?
I want to be an iOS developer and I'm very new to Xcode, what should I learn at the very beginning? step by step. thanks
iphone
objective-c
ios
xcode
null
02/08/2012 02:35:40
not constructive
What things that iOS developer have to know first? === I want to be an iOS developer and I'm very new to Xcode, what should I learn at the very beginning? step by step. thanks
4
7,746,623
10/12/2011 21:09:02
739,298
05/05/2011 06:21:18
1
0
MOSS 2007, Word document write (The remote procedure call failed. (Exception from HRESULT: 0x800706BE) )
Background: I have 2 sites (Site A and Site B), hosted on same server. Both have lot of simillar functionality. To achieve this we have written base libries and have created dynamic controls were functionality changes. Requirement: I have a requirement to update the word document template stored in base document library and upload the template to site's document library through code. Issue Updation of document and uploading to site works very fine in site A. In site B, when user try to open the word file template from the document library. It throws error:**The remote procedure call failed. (Exception from HRESULT: 0x800706BE)** code written for both the site is same. Code: </i> if (File.Exists((string)filename)) { object readOnly = false; object isVisible = false; wordApp.Visible = false; Doc = wordApp.Documents.Open(ref filename, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing); Doc.Activate(); } </i>
sharepoint2007
null
null
null
null
null
open
MOSS 2007, Word document write (The remote procedure call failed. (Exception from HRESULT: 0x800706BE) ) === Background: I have 2 sites (Site A and Site B), hosted on same server. Both have lot of simillar functionality. To achieve this we have written base libries and have created dynamic controls were functionality changes. Requirement: I have a requirement to update the word document template stored in base document library and upload the template to site's document library through code. Issue Updation of document and uploading to site works very fine in site A. In site B, when user try to open the word file template from the document library. It throws error:**The remote procedure call failed. (Exception from HRESULT: 0x800706BE)** code written for both the site is same. Code: </i> if (File.Exists((string)filename)) { object readOnly = false; object isVisible = false; wordApp.Visible = false; Doc = wordApp.Documents.Open(ref filename, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing); Doc.Activate(); } </i>
0
2,136,832
01/26/2010 00:38:04
228,132
12/09/2009 17:11:27
21
2
Create an Acrobat button to insert the current date
I'm building a report form in Acrobat and have a date field that I want to update by pressing form button on the page. (What I was thinking was a non-printing button.) What Javascript would I need to place in the button to make it insert the current date in the date form field.
acrobat
pdf
forms
null
null
null
open
Create an Acrobat button to insert the current date === I'm building a report form in Acrobat and have a date field that I want to update by pressing form button on the page. (What I was thinking was a non-printing button.) What Javascript would I need to place in the button to make it insert the current date in the date form field.
0
7,360,127
09/09/2011 10:13:02
660,491
03/15/2011 11:46:16
1
2
Which more beautiful?
i have a dispute with my colleague. There is a two code versions. Witch one you think is more beautiful: His variant result = false if !real_account.nil? if payments.finished.count > 0 result = true elsif real_account.created_at < date_from_str('2011-01-01') result = Trade.has_payments(real_account.login, date_from_str('2011-01-01')) end end return result My Variant date = date_from_str('2011-01-01') if !real_account.nil? result = false result = payments.finished.count > 0 result = Trade.has_payments(real_account.login, date) if !result && real_account.created_at < date end
ruby-on-rails
ruby
null
null
null
09/09/2011 10:15:39
not constructive
Which more beautiful? === i have a dispute with my colleague. There is a two code versions. Witch one you think is more beautiful: His variant result = false if !real_account.nil? if payments.finished.count > 0 result = true elsif real_account.created_at < date_from_str('2011-01-01') result = Trade.has_payments(real_account.login, date_from_str('2011-01-01')) end end return result My Variant date = date_from_str('2011-01-01') if !real_account.nil? result = false result = payments.finished.count > 0 result = Trade.has_payments(real_account.login, date) if !result && real_account.created_at < date end
4
3,249,345
07/14/2010 18:43:50
379,235
06/29/2010 16:45:28
9
5
Python convert string object into dictionary
I have been working to build a complex data structure which would return a dictionary. Currently that class return string object of the form { cset : x, b1 : y, b2 : z, dep : { cset : x1, b1 : y1, b2 : z1, dep : { cset : x2, b1 : y2, b2 : z2, dep : <same as above.it recurses few more levels> ....... } } } I want to convert this whole string object into dictionary. I read on one of the articles to use `pickle` module, but I don't want to serialize it into some file and use it. Ref : [http://bytes.com/topic/python/answers/36059-convert-dictionary-string-vice-versa][1] I am looking for some other neater ways of doing it, if possible. Would be great to know any such ways Thank you [1]: http://bytes.com/topic/python/answers/36059-convert-dictionary-string-vice-versa
python
string
dictionary
null
null
null
open
Python convert string object into dictionary === I have been working to build a complex data structure which would return a dictionary. Currently that class return string object of the form { cset : x, b1 : y, b2 : z, dep : { cset : x1, b1 : y1, b2 : z1, dep : { cset : x2, b1 : y2, b2 : z2, dep : <same as above.it recurses few more levels> ....... } } } I want to convert this whole string object into dictionary. I read on one of the articles to use `pickle` module, but I don't want to serialize it into some file and use it. Ref : [http://bytes.com/topic/python/answers/36059-convert-dictionary-string-vice-versa][1] I am looking for some other neater ways of doing it, if possible. Would be great to know any such ways Thank you [1]: http://bytes.com/topic/python/answers/36059-convert-dictionary-string-vice-versa
0
11,105,212
06/19/2012 16:22:10
975,423
10/02/2011 13:42:27
11
1
Form Not Submitting In Windows Phone 7 (IE)
I have been developing my website from scratch and have ran into a problem with the native browser on Windows Phone 7. I have built a form that is submitted through a javascript function via. an anchor tag onclick event, using the JQuery .submit() function. The browser seems to load then hangs without ever completing the form post. Does anyone know why this happens? And is there a better alternative? You can test it at http://m.syndiquick.com/play/add/euromillions
php
javascript
jquery
windows-phone-7
onclick
06/19/2012 17:20:05
too localized
Form Not Submitting In Windows Phone 7 (IE) === I have been developing my website from scratch and have ran into a problem with the native browser on Windows Phone 7. I have built a form that is submitted through a javascript function via. an anchor tag onclick event, using the JQuery .submit() function. The browser seems to load then hangs without ever completing the form post. Does anyone know why this happens? And is there a better alternative? You can test it at http://m.syndiquick.com/play/add/euromillions
3
5,169,526
03/02/2011 15:16:28
641,427
03/02/2011 15:11:01
1
0
android app authorisation
I am making an application in android. How to do role authorisation in android. is there any package. please let me know. Thanks, NVN
android
authorization
null
null
null
null
open
android app authorisation === I am making an application in android. How to do role authorisation in android. is there any package. please let me know. Thanks, NVN
0
8,063,973
11/09/2011 10:56:37
1,037,426
11/09/2011 10:18:40
1
0
Facebook not fetching Thumbnail Images/Meta Tags for French Language Website
We have a Prestashop based website which is also translated into French. If we share the english version URL from the website on Facebook, the thumbnail and Meta are displayed correctly. However, when the french version of the same URL is shared on Facebook, neither the thumbnail images or the Meta tags info is fetched. We are using absolute references for images. Also tried OG tags on a few pages but it does not solves the problem. Another interesting bug is that for some of the URL's in french, Facebook fetches thumbnails and meta tags properly. But for other URLs in french it does not. Example of french URL working properly ([linter output][1]) Example of French URL not working properly ([linter output][2]) [1]: http://www.fly-belts.com/fr/content/6-livraison-gratuite [2]: http://www.fly-belts.com/fr/content/4-infos-vol Any help would be appreciated.
facebook
hyperlink
sharing
english
null
null
open
Facebook not fetching Thumbnail Images/Meta Tags for French Language Website === We have a Prestashop based website which is also translated into French. If we share the english version URL from the website on Facebook, the thumbnail and Meta are displayed correctly. However, when the french version of the same URL is shared on Facebook, neither the thumbnail images or the Meta tags info is fetched. We are using absolute references for images. Also tried OG tags on a few pages but it does not solves the problem. Another interesting bug is that for some of the URL's in french, Facebook fetches thumbnails and meta tags properly. But for other URLs in french it does not. Example of french URL working properly ([linter output][1]) Example of French URL not working properly ([linter output][2]) [1]: http://www.fly-belts.com/fr/content/6-livraison-gratuite [2]: http://www.fly-belts.com/fr/content/4-infos-vol Any help would be appreciated.
0
6,255,849
06/06/2011 17:37:08
598,478
09/20/2010 22:46:13
41
3
Point of sale (POS) software using php and mysql
I am expected to integrate a bar code scanner in a point of sale software of which I chose to implement using php and mysql, problem is I've not done any hardware programming in php before and I don't know anything about bar code scanners and their API in they exist. Please any direction on what to do or where to get help - Thanks very much
php
hardware
barcode-scanner
null
null
06/06/2011 18:02:20
not a real question
Point of sale (POS) software using php and mysql === I am expected to integrate a bar code scanner in a point of sale software of which I chose to implement using php and mysql, problem is I've not done any hardware programming in php before and I don't know anything about bar code scanners and their API in they exist. Please any direction on what to do or where to get help - Thanks very much
1
11,582,150
07/20/2012 15:16:25
1,310,873
04/03/2012 16:00:31
84
1
index trees with c++/boost
I want to do the next tree: 1 1.1 1.2 1.1.1 1.1.2 1.2.1 1.2.2 1.1.1.1 1.1.1.2 1.2.2.1 1.2.2.2 at the end I have the list with the final level of all index as follows,(in disorder): 1.2.2.2 1.2.2.1 1.1.1.2 1.2.1 1.1.2 1.1.1.1 How to use a boost library to index in this way and sort them like this: 1.1.1.1 1.1.1.2 1.1.2 1.2.1 1.2.2.1 1.2.2.2 thanks in advance vacing
c++
boost
null
null
null
07/20/2012 23:06:42
not a real question
index trees with c++/boost === I want to do the next tree: 1 1.1 1.2 1.1.1 1.1.2 1.2.1 1.2.2 1.1.1.1 1.1.1.2 1.2.2.1 1.2.2.2 at the end I have the list with the final level of all index as follows,(in disorder): 1.2.2.2 1.2.2.1 1.1.1.2 1.2.1 1.1.2 1.1.1.1 How to use a boost library to index in this way and sort them like this: 1.1.1.1 1.1.1.2 1.1.2 1.2.1 1.2.2.1 1.2.2.2 thanks in advance vacing
1
5,401,834
03/23/2011 06:58:31
163
08/02/2008 20:40:09
1,568
38
ASP.net Web Application Project directory structure.
I've recently converted an ASP.net 2.0 Web Site Project to an ASP.net 3.5 Web Application Project and I'm still getting used to the way the files are structured. The problem I'm running into is that when I build the corresponding Web Deployment Project it copies the `obj` directory. But its my understanding that the `obj` directory is just intermediary and doesn't provide any useful purpose for a deployed website right? If that is correct, is there some way to configure the Web Application Project to put the intermediary `obj` directory elsewhere, or is there something else I should be doing to handle this properly?
asp.net
web-deployment-project
web-application-project
null
null
null
open
ASP.net Web Application Project directory structure. === I've recently converted an ASP.net 2.0 Web Site Project to an ASP.net 3.5 Web Application Project and I'm still getting used to the way the files are structured. The problem I'm running into is that when I build the corresponding Web Deployment Project it copies the `obj` directory. But its my understanding that the `obj` directory is just intermediary and doesn't provide any useful purpose for a deployed website right? If that is correct, is there some way to configure the Web Application Project to put the intermediary `obj` directory elsewhere, or is there something else I should be doing to handle this properly?
0
8,253,222
11/24/2011 06:59:21
1,063,382
11/24/2011 06:54:33
1
0
Keystore lost, can anything be done in order to provide update on marketplace
I have gone through many forum discussions regarding this but still wants to try my luck. Is there any ANY way I can provide update on marketplace without my keystore. My old system was formatted and the file was not backed up. Now I have my old client want to have some update done on the app. Any suggestion guys??
android
android-market
null
null
null
11/25/2011 03:36:39
off topic
Keystore lost, can anything be done in order to provide update on marketplace === I have gone through many forum discussions regarding this but still wants to try my luck. Is there any ANY way I can provide update on marketplace without my keystore. My old system was formatted and the file was not backed up. Now I have my old client want to have some update done on the app. Any suggestion guys??
2
11,221,883
06/27/2012 08:06:56
1,178,042
01/30/2012 12:25:24
60
0
Get all occurrences of substring matching pattern
I have a string that's on this form: "Some text [asd](fgh) Lorem Ipsum [qwert](y)" You might recognize this as markdown syntax. I want to replace all occurences of the pattern with links like this: <a href="fgh">asd</a> What would be the best way to do this? I can do the actual replacing without problem, but I'm not sure about how to identify the substrings. I suspect regex is the way to go? Thanks in advance for all help!
c#
regex
null
null
null
06/27/2012 14:32:25
not a real question
Get all occurrences of substring matching pattern === I have a string that's on this form: "Some text [asd](fgh) Lorem Ipsum [qwert](y)" You might recognize this as markdown syntax. I want to replace all occurences of the pattern with links like this: <a href="fgh">asd</a> What would be the best way to do this? I can do the actual replacing without problem, but I'm not sure about how to identify the substrings. I suspect regex is the way to go? Thanks in advance for all help!
1
3,688,708
09/10/2010 22:08:14
444,793
09/10/2010 22:08:14
1
0
Python, safe, sandbox
I'd like to make a website where people could upload their Python scripts. Of course I'd like to execute those scripts. Those scripts should do some interesting work. The problem is that people could upload scripts that could harm my server and I'd like to prevent that. What is the option to run arbitrary scripts without harming my system - actually without seeing my system at all? Thank you
python
sandbox
safe
null
null
null
open
Python, safe, sandbox === I'd like to make a website where people could upload their Python scripts. Of course I'd like to execute those scripts. Those scripts should do some interesting work. The problem is that people could upload scripts that could harm my server and I'd like to prevent that. What is the option to run arbitrary scripts without harming my system - actually without seeing my system at all? Thank you
0
7,265,332
09/01/2011 01:42:44
34,548
11/05/2008 03:56:35
2,314
56
hosted service to call a webpage at a scheduled time?
I am looking for a hosted service to call certain webpages at a certain time. I am looking for a company that offers this service, anyone know of such a thing?
service
null
null
null
null
null
open
hosted service to call a webpage at a scheduled time? === I am looking for a hosted service to call certain webpages at a certain time. I am looking for a company that offers this service, anyone know of such a thing?
0
7,424,324
09/14/2011 23:51:31
945,726
09/14/2011 23:51:31
1
0
jQuery animated page scroll with offset for fixed header blinks faded content
I've got a fixed header/navigation on my site, which the page scrolls under (similar to Twitter). I'm trying to get it to smoothly scroll to articles within the page, while accounting for the height of the header, as not to cover up the top portion of the articles. I think I've got the header height offset going, but the scroll is pretty choppy and inconsistent, and all the content with faded opacity blinks on when the navigation is used. please see a test here: [http://sketch.ryantroyford.com/newSite/testSite.html][1] any idea what the problem could be? thanks in advance! cheers ryan [1]: http://sketch.ryantroyford.com/newSite/testSite.html
jquery
navigation
scroll
animate
null
null
open
jQuery animated page scroll with offset for fixed header blinks faded content === I've got a fixed header/navigation on my site, which the page scrolls under (similar to Twitter). I'm trying to get it to smoothly scroll to articles within the page, while accounting for the height of the header, as not to cover up the top portion of the articles. I think I've got the header height offset going, but the scroll is pretty choppy and inconsistent, and all the content with faded opacity blinks on when the navigation is used. please see a test here: [http://sketch.ryantroyford.com/newSite/testSite.html][1] any idea what the problem could be? thanks in advance! cheers ryan [1]: http://sketch.ryantroyford.com/newSite/testSite.html
0
10,252,297
04/20/2012 19:22:08
1,169,680
01/25/2012 16:54:38
1
0
How to get current Orderid in Custom function in Order.php model file magento
I've create one custom function as public function getUnlock() { $id = Mage::getSingleton('checkout/session')->getLastOrderId(); $connection = Mage::getSingleton('core/resource')->getConnection('core_read'); $select = $connection->select()->from('sales_flat_order_item', array('unlock_code')) ->where('order_id =?',$id); $rowsArray = $connection->fetchAll($select); return $rowsArray[0]['unlock_code']; } and access this function in mail template as {{var order.getUnlock}}.but in the above function I could not get the order id.how to I get the order id in this function.(I'm very new to magento)
magento
order
null
null
null
null
open
How to get current Orderid in Custom function in Order.php model file magento === I've create one custom function as public function getUnlock() { $id = Mage::getSingleton('checkout/session')->getLastOrderId(); $connection = Mage::getSingleton('core/resource')->getConnection('core_read'); $select = $connection->select()->from('sales_flat_order_item', array('unlock_code')) ->where('order_id =?',$id); $rowsArray = $connection->fetchAll($select); return $rowsArray[0]['unlock_code']; } and access this function in mail template as {{var order.getUnlock}}.but in the above function I could not get the order id.how to I get the order id in this function.(I'm very new to magento)
0
7,698,082
10/08/2011 16:13:16
985,521
10/08/2011 16:00:28
1
0
Cake PHP Validation (+ preg_match()-warning)
using cakephp 2.0 rc3. following validation in my model: var $validate = array( 'loginname' => array( 'minCharactersRule' => array( 'rule' => array('minLength', 3), ), 'alphaNumericRule' => array( 'rule' => 'alphaNumeric', ), 'uniqueRule' => array( 'rule' => 'isUnique', ), 'on' => 'create', 'required' => true, 'allowEmpty' => false, ), 'password' => array( 'minCharactersRule' => array( 'rule' => array('minLength', 5), ), 'required' => true, 'allowEmpty' => false, ), 'email' => array( 'emailRule' => array( 'rule' => array('email'), ), 'uniqueRule' => array( 'rule' => 'isUnique', ), 'required' => true, 'allowEmtpy' => false, ), 'display_name' => array( 'betweenRule' => array( 'rule' => array('between', 3, 20), ), 'uniqueRule' => array( 'rule' => 'isUnique', ), 'required' => true, 'allowEmpty' => false, ), 'registered' => array( 'rule' => array('date', 'ymd'), 'required' => false, 'allowEmpty' => false, 'on' => 'create' ), 'status' => array( 'rule' => 'numeric', 'required' => false, 'allowEmpty' => false, 'on' => 'create' ), ); when i fill out every field and submit im getting "required" error messages... debug($this->Model->validationErrors) says: Array( [loginname] => Array ( [0] => required ) [password] => Array ( [0] => required ) [email] => Array ( [0] => required ) [display_name] => Array ( [0] => required )) in addition some ugly warnings appear: Warning (2): preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash [CORE/Cake/Model/Model.php, line 2981] (4 times) when i saw it the first time, i thought i misstyped anything, but after checking 3-4 times and getting the same error, i decided to come here to ask :x am i missing anything? running out of ideas ... nahri
cakephp
null
null
null
null
null
open
Cake PHP Validation (+ preg_match()-warning) === using cakephp 2.0 rc3. following validation in my model: var $validate = array( 'loginname' => array( 'minCharactersRule' => array( 'rule' => array('minLength', 3), ), 'alphaNumericRule' => array( 'rule' => 'alphaNumeric', ), 'uniqueRule' => array( 'rule' => 'isUnique', ), 'on' => 'create', 'required' => true, 'allowEmpty' => false, ), 'password' => array( 'minCharactersRule' => array( 'rule' => array('minLength', 5), ), 'required' => true, 'allowEmpty' => false, ), 'email' => array( 'emailRule' => array( 'rule' => array('email'), ), 'uniqueRule' => array( 'rule' => 'isUnique', ), 'required' => true, 'allowEmtpy' => false, ), 'display_name' => array( 'betweenRule' => array( 'rule' => array('between', 3, 20), ), 'uniqueRule' => array( 'rule' => 'isUnique', ), 'required' => true, 'allowEmpty' => false, ), 'registered' => array( 'rule' => array('date', 'ymd'), 'required' => false, 'allowEmpty' => false, 'on' => 'create' ), 'status' => array( 'rule' => 'numeric', 'required' => false, 'allowEmpty' => false, 'on' => 'create' ), ); when i fill out every field and submit im getting "required" error messages... debug($this->Model->validationErrors) says: Array( [loginname] => Array ( [0] => required ) [password] => Array ( [0] => required ) [email] => Array ( [0] => required ) [display_name] => Array ( [0] => required )) in addition some ugly warnings appear: Warning (2): preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash [CORE/Cake/Model/Model.php, line 2981] (4 times) when i saw it the first time, i thought i misstyped anything, but after checking 3-4 times and getting the same error, i decided to come here to ask :x am i missing anything? running out of ideas ... nahri
0
11,647,184
07/25/2012 09:56:41
1,528,839
07/16/2012 12:07:18
6
0
Objective C: OpenAL using .CAF
Good day! i have a question regarding .caf files in openAL path...is it possible to use .caf file in openAL? because when i use a current .wav file in the filepath it actually run.. but when i use .caf.. it doesnt have errors but when i run it, it says: 2012-07-25 17:46:18.314 openALplaybackTRY[20432:10a03] Error setting audio session category! -50 AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved 2012-07-25 17:46:18.638 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn: dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.668 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn: dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.741 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.753 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.834 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.846 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.869 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.879 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:20.053 openALplaybackTRY[20432:10a03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter' *** First throw call stack: (0x148f022 0x1aaccd6 0x1437a48 0x14379b9 0xe0a53b 0xe0a4c5 0x6dc4 0x7243 0x68b5 0x6ea135 0x7e9c6e 0x7e98f1 0x7e9383 0x58dfd0 0x6ea135 0x7e9c6e 0x7e9383 0x6e9c76 0x7e9c6e 0x7e967b 0x7e9383 0x6e9105 0x8f2eef 0x8f303e 0x4c7d7a 0x4c7ff8 0x4c717f 0x4d6183 0x4d6c38 0x4ca634 0x3ad0ef5 0x1463195 0x13c7ff2 0x13c68da 0x13c5d84 0x13c5c9b 0x4c6c65 0x4c8626 0x24fd 0x2465) terminate called throwing an exception(lldb) >Thread 1:signal SIGABRT and this is my code: aolPlayback.m @initBuffer(actually from apple) // get some audio data from a wave file CFURLRef fileURL = (__bridge CFURLRef)[NSURL fileURLWithPath:[bundle pathForResource:@"Alice01" ofType:@"caf"]];
objective-c
ios
openal
null
null
null
open
Objective C: OpenAL using .CAF === Good day! i have a question regarding .caf files in openAL path...is it possible to use .caf file in openAL? because when i use a current .wav file in the filepath it actually run.. but when i use .caf.. it doesnt have errors but when i run it, it says: 2012-07-25 17:46:18.314 openALplaybackTRY[20432:10a03] Error setting audio session category! -50 AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved 2012-07-25 17:46:18.638 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn: dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.668 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn: dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.741 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.753 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.834 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.846 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.869 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:18.879 openALplaybackTRY[20432:10a03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-07-25 17:46:20.053 openALplaybackTRY[20432:10a03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter' *** First throw call stack: (0x148f022 0x1aaccd6 0x1437a48 0x14379b9 0xe0a53b 0xe0a4c5 0x6dc4 0x7243 0x68b5 0x6ea135 0x7e9c6e 0x7e98f1 0x7e9383 0x58dfd0 0x6ea135 0x7e9c6e 0x7e9383 0x6e9c76 0x7e9c6e 0x7e967b 0x7e9383 0x6e9105 0x8f2eef 0x8f303e 0x4c7d7a 0x4c7ff8 0x4c717f 0x4d6183 0x4d6c38 0x4ca634 0x3ad0ef5 0x1463195 0x13c7ff2 0x13c68da 0x13c5d84 0x13c5c9b 0x4c6c65 0x4c8626 0x24fd 0x2465) terminate called throwing an exception(lldb) >Thread 1:signal SIGABRT and this is my code: aolPlayback.m @initBuffer(actually from apple) // get some audio data from a wave file CFURLRef fileURL = (__bridge CFURLRef)[NSURL fileURLWithPath:[bundle pathForResource:@"Alice01" ofType:@"caf"]];
0
5,020,371
02/16/2011 18:11:49
557,492
12/29/2010 18:47:42
11
0
How to get jQuery pop to disappear again?
How do I get my jQuery pop-up to disappear again when "approvals" is clicked again? $(function() { $('a.approvals').click(function(e) { var html = '<div id="info">'; html += '<a href ="http://www.coned.com/es/specs/gas/Section%20VII.pdf" div id="ConED"><img border= "0" src="con_edison_logo.png" /></a>'; html += '<a href ="pdfs/2009_natl_grid_blue_book_web.pdf" div id="NationalGrid"><img border= "0" src="national_grid_logo.png" /></a>'; html += '<a href ="http://database.ul.com/cgi-bin/XYV/template/LISEXT/1FRAME/showpage.html?name=JIFQ.MH46473&ccnshorttitle=Gas+Boosters&objid=1079858133&cfgid=1073741824&version=versionless&parent_id=1073988683&sequence=1" div id="ULLogo"><img border= "0" src="ul_logo_a.png" /></a>'; html += '<a href ="http://license.reg.state.ma.us/pubLic/pl_products/pb_search.asp?type=G&manufacturer=Etter+Engineering+Company+Inc.&model=&product=&description=&psize=50" div id="MassGov"><img border= "0" src="massgovlogo.png" /></a>'; html += '<div id="ApprovalsTxtpopup">With the exception of the UL-listing, the above approval agencies are region-specific, should your local agencies require any further documentation other than our UL-listing, please contact ETTER Engineering Toll Free 1-800-444-1962 for further assistance.</div>'; html += '</div>'; $('#Wrapper').append(html).children('#info').hide().fadeIn(400); }, function() { $('#info').remove(); }); });
jquery
popup
null
null
null
null
open
How to get jQuery pop to disappear again? === How do I get my jQuery pop-up to disappear again when "approvals" is clicked again? $(function() { $('a.approvals').click(function(e) { var html = '<div id="info">'; html += '<a href ="http://www.coned.com/es/specs/gas/Section%20VII.pdf" div id="ConED"><img border= "0" src="con_edison_logo.png" /></a>'; html += '<a href ="pdfs/2009_natl_grid_blue_book_web.pdf" div id="NationalGrid"><img border= "0" src="national_grid_logo.png" /></a>'; html += '<a href ="http://database.ul.com/cgi-bin/XYV/template/LISEXT/1FRAME/showpage.html?name=JIFQ.MH46473&ccnshorttitle=Gas+Boosters&objid=1079858133&cfgid=1073741824&version=versionless&parent_id=1073988683&sequence=1" div id="ULLogo"><img border= "0" src="ul_logo_a.png" /></a>'; html += '<a href ="http://license.reg.state.ma.us/pubLic/pl_products/pb_search.asp?type=G&manufacturer=Etter+Engineering+Company+Inc.&model=&product=&description=&psize=50" div id="MassGov"><img border= "0" src="massgovlogo.png" /></a>'; html += '<div id="ApprovalsTxtpopup">With the exception of the UL-listing, the above approval agencies are region-specific, should your local agencies require any further documentation other than our UL-listing, please contact ETTER Engineering Toll Free 1-800-444-1962 for further assistance.</div>'; html += '</div>'; $('#Wrapper').append(html).children('#info').hide().fadeIn(400); }, function() { $('#info').remove(); }); });
0
6,638,244
07/09/2011 23:47:26
80,858
03/21/2009 13:04:10
642
31
Versioning Major releases
I'm developing an Android app and publishing it in Google Market. The problem is that the difference between v1.x and v2.x is huge, and like most products I wouldn't like to automatically provide Major upgrade for free for user of v1. Is there any way to "separate" the payment for v1 and v2, and provide "upgrade license" for users of v1?
android
null
null
null
null
07/11/2011 08:14:57
off topic
Versioning Major releases === I'm developing an Android app and publishing it in Google Market. The problem is that the difference between v1.x and v2.x is huge, and like most products I wouldn't like to automatically provide Major upgrade for free for user of v1. Is there any way to "separate" the payment for v1 and v2, and provide "upgrade license" for users of v1?
2
3,695,536
09/12/2010 16:09:04
158,008
08/17/2009 20:35:44
303
2
asp.net jquery datepicker control with image?
I am looking for Jquery datepicker control like ajax calendar control with image button next to text box in asp.net. If any examples available please share with me. I saw this http://www.west-wind.com/weblog/posts/891888.aspx, but I donot custom control.
javascript
asp.net
jquery
null
null
null
open
asp.net jquery datepicker control with image? === I am looking for Jquery datepicker control like ajax calendar control with image button next to text box in asp.net. If any examples available please share with me. I saw this http://www.west-wind.com/weblog/posts/891888.aspx, but I donot custom control.
0
8,700,616
01/02/2012 12:07:51
1,082,989
12/06/2011 06:56:26
5
0
Ubuntu 11.10 Unity - time indicator is not showing the date/time
Yesterday I noticed that time indicator on the top pane is not showing the date/time, but is just saying "Time" (see attached screenshot). Does anyone know why is that so? How can I fix it and make show the date/time back again? Reinstalling indicator-datetime did not help. Thanks!
ubuntu
time
unity
null
null
01/14/2012 13:19:09
off topic
Ubuntu 11.10 Unity - time indicator is not showing the date/time === Yesterday I noticed that time indicator on the top pane is not showing the date/time, but is just saying "Time" (see attached screenshot). Does anyone know why is that so? How can I fix it and make show the date/time back again? Reinstalling indicator-datetime did not help. Thanks!
2
10,872,465
06/03/2012 17:32:50
1,433,826
06/03/2012 17:27:11
1
0
How can I optimize this code further
How can I optimize this piece of code further. And if possible, please suggest what I should usually keep in mind. public void funct(String str, int[] arr) { String temp = "saved"; for (int i = 0; i < arr.length; i++) { if (str.equals(temp) && arr[i] * 2 > 10) { Integer num = new Integer(arr[i]); num = num * 2; System.out.print(num.toString()); } } } Thank You
java
algorithm
null
null
null
06/04/2012 01:22:41
off topic
How can I optimize this code further === How can I optimize this piece of code further. And if possible, please suggest what I should usually keep in mind. public void funct(String str, int[] arr) { String temp = "saved"; for (int i = 0; i < arr.length; i++) { if (str.equals(temp) && arr[i] * 2 > 10) { Integer num = new Integer(arr[i]); num = num * 2; System.out.print(num.toString()); } } } Thank You
2
10,171,472
04/16/2012 09:16:33
1,292,042
03/26/2012 02:20:35
41
1
reading textfile contents
Ok i have this code $myFile = "testFile.txt"; $fh = fopen($myFile, 'r'); $theData = fread($fh, filesize($myFile)); fclose($fh); echo $theData testFile.txt contents: <script type="text/javascript" src="js/jquery.js"/> <script type="text/javascript" src="js/webdefault.js"/> <stype type="text/css" src="css/style.css"/> No I want to read those contentst by line and output each by each line the output in the html if its going to be output is this: <script type="text/javascript" src="js/jquery.js"/> <script type="text/javascript" src="js/webdefault.js"/> <stype type="text/css" src="css/style.css"/> thank you in advance
php
null
null
null
null
04/18/2012 13:58:15
not a real question
reading textfile contents === Ok i have this code $myFile = "testFile.txt"; $fh = fopen($myFile, 'r'); $theData = fread($fh, filesize($myFile)); fclose($fh); echo $theData testFile.txt contents: <script type="text/javascript" src="js/jquery.js"/> <script type="text/javascript" src="js/webdefault.js"/> <stype type="text/css" src="css/style.css"/> No I want to read those contentst by line and output each by each line the output in the html if its going to be output is this: <script type="text/javascript" src="js/jquery.js"/> <script type="text/javascript" src="js/webdefault.js"/> <stype type="text/css" src="css/style.css"/> thank you in advance
1
5,570,812
04/06/2011 17:53:55
537,082
07/27/2010 21:23:44
161
1
Adding class to form_dropdown in CodeIgniter
How do I add a class to a form_dropdown in CodeIgniter if I also have a Javascript attached. Here is my code: $language = array( 'select' => 'Select Language', 'chinese' => '&#20013;&#25991;', 'english' => 'English', 'french' => 'Fran&ccedil;ais', 'german' => 'Deutsch', 'italian' => 'Italiano', 'japanese' => '&#26085;&#26412;', 'korean' => '&#54620;&#44397;&#50612;', 'polish' => 'Polska', 'portuguese' => 'Portugu&ecirc;s', 'russian' => '&#1056;&#1086;&#1089;&#1089;&#1048&#1070;', 'spanish' => 'Espa&ntilde;ol' ); $js = 'onChange="this.form.submit()"'; echo form_dropdown('language', $language, 'select', $js);
codeigniter
null
null
null
null
null
open
Adding class to form_dropdown in CodeIgniter === How do I add a class to a form_dropdown in CodeIgniter if I also have a Javascript attached. Here is my code: $language = array( 'select' => 'Select Language', 'chinese' => '&#20013;&#25991;', 'english' => 'English', 'french' => 'Fran&ccedil;ais', 'german' => 'Deutsch', 'italian' => 'Italiano', 'japanese' => '&#26085;&#26412;', 'korean' => '&#54620;&#44397;&#50612;', 'polish' => 'Polska', 'portuguese' => 'Portugu&ecirc;s', 'russian' => '&#1056;&#1086;&#1089;&#1089;&#1048&#1070;', 'spanish' => 'Espa&ntilde;ol' ); $js = 'onChange="this.form.submit()"'; echo form_dropdown('language', $language, 'select', $js);
0
3,818,237
09/29/2010 01:49:57
451,383
09/18/2010 12:53:25
151
11
How to get list of files that a program is working with?!
How to get list of files that a program is working with?! For example, if a program is downloading something, how can I know what is that or where is that file while downloading?
file
application
windows
null
null
null
open
How to get list of files that a program is working with?! === How to get list of files that a program is working with?! For example, if a program is downloading something, how can I know what is that or where is that file while downloading?
0
9,169,748
02/07/2012 01:13:40
141,402
07/20/2009 13:28:22
109
5
Apps for Windows 8 on OS < Win8
When writing an app for Windows 8, what is the best way to handle things when the app is run on XP, Vista or 7? 1) Do you write two separate UIs? 2) Is it best to "window" the Metro UI (or even possible?)? 3) Is Windows 8 only 64-bit, and if so, did they get rid of the WOW stuff?
windows-8
microsoft-metro
null
null
null
02/09/2012 16:51:30
not constructive
Apps for Windows 8 on OS < Win8 === When writing an app for Windows 8, what is the best way to handle things when the app is run on XP, Vista or 7? 1) Do you write two separate UIs? 2) Is it best to "window" the Metro UI (or even possible?)? 3) Is Windows 8 only 64-bit, and if so, did they get rid of the WOW stuff?
4
7,451,264
09/16/2011 23:13:13
552,053
12/23/2010 06:19:41
11
0
MVC dropdown with models
I'm analyzing MVC and trying to stick with models as opposed to using ViewData and returning models to Views as in return View(model); etc.... So I worked on preloading a dropdown with basic selections using a strongly typed model. Now on the page there is a button which will trigger an action thus using HTTPGet The problem is that after the get is fired, the page is "reloaded" and the value pertaining to the model is now null and trips an error. Do I have to re-load the dropdown again after each "post back"? thanks,
html
mvc
drop-down-menu
null
null
null
open
MVC dropdown with models === I'm analyzing MVC and trying to stick with models as opposed to using ViewData and returning models to Views as in return View(model); etc.... So I worked on preloading a dropdown with basic selections using a strongly typed model. Now on the page there is a button which will trigger an action thus using HTTPGet The problem is that after the get is fired, the page is "reloaded" and the value pertaining to the model is now null and trips an error. Do I have to re-load the dropdown again after each "post back"? thanks,
0
4,368,238
12/06/2010 15:55:57
176,608
09/21/2009 14:43:38
25
1
Why are superclass The superclass is parameterized in JAVA
package com.android.example.spinner.test; import com.android.example.spinner.SpinnerActivity; import android.test.ActivityInstrumentationTestCase2; public class SpinnerActivityTest extends ActivityInstrumentationTestCase2<SpinnerActivity> { }
android
unit-testing
null
null
null
12/08/2010 02:12:21
not a real question
Why are superclass The superclass is parameterized in JAVA === package com.android.example.spinner.test; import com.android.example.spinner.SpinnerActivity; import android.test.ActivityInstrumentationTestCase2; public class SpinnerActivityTest extends ActivityInstrumentationTestCase2<SpinnerActivity> { }
1
9,529,055
03/02/2012 06:33:13
770,703
05/26/2011 05:07:44
89
11
How to Start same activity in edit as well as update mode in android?
i have one activity in which i enter some values and save it in the data base by calling webservise on save button. and i have another view in which i see all saved data in a listview onClicking that list item i want to show the view in which i save the data but onClicking list item , i want show that view in edit mode or update mode by filling the previously saved data from data base in the activity. How can i achive this the same activity in edit mode as well ? Thanks in advance.
android
null
null
null
null
null
open
How to Start same activity in edit as well as update mode in android? === i have one activity in which i enter some values and save it in the data base by calling webservise on save button. and i have another view in which i see all saved data in a listview onClicking that list item i want to show the view in which i save the data but onClicking list item , i want show that view in edit mode or update mode by filling the previously saved data from data base in the activity. How can i achive this the same activity in edit mode as well ? Thanks in advance.
0
5,301,558
03/14/2011 16:38:41
374,198
06/23/2010 12:04:53
876
50
Where can I get up-to-date airline, flight, route and price data?
Where do sites like Expedia, Orbitz, Kayak, Bing Travel, etc. get their airline schedule data? E.g. if I was going to build some sort of site to find air travel, what data sources exist that I can use? I've found [OpenFlights.org][1] so far but this won't get me pricing information and it doesn't have actual flight information (e.g. information for a particual flight number - just the routes) so I can't tell where the layovers, etc. are. Any ideas? Thanks. [1]: http://www.openflights.org/data.html
api
data
null
null
null
03/15/2011 22:25:56
off topic
Where can I get up-to-date airline, flight, route and price data? === Where do sites like Expedia, Orbitz, Kayak, Bing Travel, etc. get their airline schedule data? E.g. if I was going to build some sort of site to find air travel, what data sources exist that I can use? I've found [OpenFlights.org][1] so far but this won't get me pricing information and it doesn't have actual flight information (e.g. information for a particual flight number - just the routes) so I can't tell where the layovers, etc. are. Any ideas? Thanks. [1]: http://www.openflights.org/data.html
2
8,754,338
01/06/2012 06:44:08
1,085,266
12/07/2011 09:12:31
34
6
Expandable ListView
When I divide the window into 2 halves, The arrow at the right end does not appear in the expandable list view. The second Image shows the perfect requirement. But I don't want it like that. i want to divide it into 2 halves. But By doing this, the "Arrow" does not appear. ![enter image description here][1] ![enter image description here][2] [1]: http://i.stack.imgur.com/Bxs8M.png [2]: http://i.stack.imgur.com/Vgm2n.png
android
expandablelistview
arrow
null
null
null
open
Expandable ListView === When I divide the window into 2 halves, The arrow at the right end does not appear in the expandable list view. The second Image shows the perfect requirement. But I don't want it like that. i want to divide it into 2 halves. But By doing this, the "Arrow" does not appear. ![enter image description here][1] ![enter image description here][2] [1]: http://i.stack.imgur.com/Bxs8M.png [2]: http://i.stack.imgur.com/Vgm2n.png
0
7,398,664
09/13/2011 08:09:05
942,071
09/13/2011 08:09:05
1
0
syntax error "create function "
CREATE FUNCTION ConvertFromBase ( @value AS VARCHAR(MAX), @base AS BIGINT ) RETURNS BIGINT AS BEGIN DECLARE @characters CHAR(36), @result BIGINT, @index SMALLINT; SELECT @characters = '0123456789abcdefghijklmnopqrstuvwxyz', @result = 0, @index = 0; IF @base < 2 OR @base > 36 RETURN NULL; WHILE @index < LEN(@value) SELECT @result = @result + POWER(@base, @index) * (CHARINDEX (SUBSTRING(@value, LEN(@value) - @index, 1) , @characters) - 1 ), @index = @index + 1; -- return the result RETURN @result; END dbo.ConvertFromBase('nawy fieldaka', 16)
sql-server
null
null
null
null
09/13/2011 10:37:16
not a real question
syntax error "create function " === CREATE FUNCTION ConvertFromBase ( @value AS VARCHAR(MAX), @base AS BIGINT ) RETURNS BIGINT AS BEGIN DECLARE @characters CHAR(36), @result BIGINT, @index SMALLINT; SELECT @characters = '0123456789abcdefghijklmnopqrstuvwxyz', @result = 0, @index = 0; IF @base < 2 OR @base > 36 RETURN NULL; WHILE @index < LEN(@value) SELECT @result = @result + POWER(@base, @index) * (CHARINDEX (SUBSTRING(@value, LEN(@value) - @index, 1) , @characters) - 1 ), @index = @index + 1; -- return the result RETURN @result; END dbo.ConvertFromBase('nawy fieldaka', 16)
1
6,602,306
07/06/2011 20:09:58
475,121
10/13/2010 22:47:21
3
0
Rewrite only if Folder exists but file doesn't
I am trying to rewrite all requests to a file that doesn't exist but the folder does. What I mean is: Say I have this folder structure: foo '-bar1 '-bar2 '-bar2.html '-shared '-shared.html What I am looking for the rewrite rule to do is to serve up example.com/foo/bar2/bar2.html as normal. Serve example.com/foo/bar1/bar1.html as /foo/shared/shared.html and to no serve example.com/foo/bar3/bar3.html. So in summary. I am trying to develop a RewriteCond that hits only when the directory exists but the file doesnt exist in that directory. The problem with: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d is that it will rewrite www.example.com/bar3/bar3.html even though /foo/bar3 directory doesn't exist. Thanks for the help!
mod-rewrite
apache2
null
null
null
null
open
Rewrite only if Folder exists but file doesn't === I am trying to rewrite all requests to a file that doesn't exist but the folder does. What I mean is: Say I have this folder structure: foo '-bar1 '-bar2 '-bar2.html '-shared '-shared.html What I am looking for the rewrite rule to do is to serve up example.com/foo/bar2/bar2.html as normal. Serve example.com/foo/bar1/bar1.html as /foo/shared/shared.html and to no serve example.com/foo/bar3/bar3.html. So in summary. I am trying to develop a RewriteCond that hits only when the directory exists but the file doesnt exist in that directory. The problem with: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d is that it will rewrite www.example.com/bar3/bar3.html even though /foo/bar3 directory doesn't exist. Thanks for the help!
0
11,494,537
07/15/2012 18:34:12
1,527,288
07/15/2012 18:27:29
1
0
Can we register for iOS developer program from India
Can we register for iOS developer program from India and sell the apps? In Google Play for Android I can not sell apps from India. So is it possible for iOS? and can I pay $99/year by VISA Debit card? Sorry I searched everywhere but cant find the answer, even if this is not a 100% programming question but still please do answer if you can. Thanx in advance.
ios
null
null
null
null
07/15/2012 21:30:46
off topic
Can we register for iOS developer program from India === Can we register for iOS developer program from India and sell the apps? In Google Play for Android I can not sell apps from India. So is it possible for iOS? and can I pay $99/year by VISA Debit card? Sorry I searched everywhere but cant find the answer, even if this is not a 100% programming question but still please do answer if you can. Thanx in advance.
2
9,283,928
02/14/2012 20:45:40
374,512
06/23/2010 17:52:53
88
2
java switch statement with multiple cases and case ranges
I wanted to find a way to do this in java 6, but it doesn't exist: switch (c) { case ['a'..'z']: return "lower case" ; There was a proposal to add this to the java language some time ago: http://mail.openjdk.java.net/pipermail/coin-dev/2009-March/000213.html, has anything materialized in java 7? What are other ways to rewrite this code in java 6, that would read more like a switch/case: if (theEnum == MyEnum.A || theEnum == MyEnum.B){ }else if(), else if, else if...
java
switch-statement
null
null
null
null
open
java switch statement with multiple cases and case ranges === I wanted to find a way to do this in java 6, but it doesn't exist: switch (c) { case ['a'..'z']: return "lower case" ; There was a proposal to add this to the java language some time ago: http://mail.openjdk.java.net/pipermail/coin-dev/2009-March/000213.html, has anything materialized in java 7? What are other ways to rewrite this code in java 6, that would read more like a switch/case: if (theEnum == MyEnum.A || theEnum == MyEnum.B){ }else if(), else if, else if...
0
8,507,840
12/14/2011 16:19:08
725,505
04/26/2011 13:57:18
42
0
Android how to cancel event with back key without saving data
I am trying to use handle database with insert, update, and delete such as notepad. I have problem with back key because when I press the back key, I don't want to save any data. In normal case which presses the confirm button, it will be saved into sqlite and will be displayed on listview. How can I make cancel event through back key or more button event? I am trying to use onBackPressed, onPause, and onResume. When I press the back key in edit page, onPause() is calling, but I do not want to use saveState() when I pressed back key. How can I make it? Could you give me some feedback? Thanks. @Override protected void onPause() { Toast.makeText(this, "onPause", Toast.LENGTH_SHORT).show(); super.onPause(); saveState(); } @Override protected void onResume() { Toast.makeText(this, "onResume", Toast.LENGTH_SHORT).show(); super.onResume(); Resume_populateFields(); } @Override public void onBackPressed() { Toast.makeText(this, "onBackPressed", Toast.LENGTH_SHORT).show(); super.onBackPressed(); finish(); } private void saveState() { String name = (String) nameEdit.getText().toString(); String category = (String) categoryEdit.getText().toString(); String expired_date = (String) expired_Date_Btn.getText().toString(); Bitmap imageBitmap = ((BitmapDrawable) mImageView.getDrawable()) .getBitmap(); ByteArrayOutputStream imageByteStream = new ByteArrayOutputStream(); imageBitmap.compress(Bitmap.CompressFormat.PNG, 100, imageByteStream); if (mRowId == null) { long id = mDbHelper.insertItem(category, name, expired_date, imageByteStream); if (id > 0) { mRowId = id; } } else { mDbHelper.updateItem(mRowId, category, name, expired_date, imageByteStream); } } private void Resume_populateFields() { if (mRowId != null) { Cursor data = mDbHelper.fetchItem(mRowId); startManagingCursor(data); // load information from sqlite nameEdit.setText(data.getString(data .getColumnIndexOrThrow(FridgeDbAdapter.KEY_NAME))); categoryEdit.setText(data.getString(data .getColumnIndexOrThrow(FridgeDbAdapter.KEY_CATEGORY))); expired_Date_Btn.setText(data.getString(data .getColumnIndexOrThrow(FridgeDbAdapter.KEY_EXPIRED_DATE))); } else { // call display date when list is clicked expired_Date_Btn.setText(new StringBuilder().append(mDay) .append("/") // month is 0 based. Then add 1 .append(mMonth + 1).append("/").append(mYear).append(" ")); } }
android
keydown
onpause
null
null
null
open
Android how to cancel event with back key without saving data === I am trying to use handle database with insert, update, and delete such as notepad. I have problem with back key because when I press the back key, I don't want to save any data. In normal case which presses the confirm button, it will be saved into sqlite and will be displayed on listview. How can I make cancel event through back key or more button event? I am trying to use onBackPressed, onPause, and onResume. When I press the back key in edit page, onPause() is calling, but I do not want to use saveState() when I pressed back key. How can I make it? Could you give me some feedback? Thanks. @Override protected void onPause() { Toast.makeText(this, "onPause", Toast.LENGTH_SHORT).show(); super.onPause(); saveState(); } @Override protected void onResume() { Toast.makeText(this, "onResume", Toast.LENGTH_SHORT).show(); super.onResume(); Resume_populateFields(); } @Override public void onBackPressed() { Toast.makeText(this, "onBackPressed", Toast.LENGTH_SHORT).show(); super.onBackPressed(); finish(); } private void saveState() { String name = (String) nameEdit.getText().toString(); String category = (String) categoryEdit.getText().toString(); String expired_date = (String) expired_Date_Btn.getText().toString(); Bitmap imageBitmap = ((BitmapDrawable) mImageView.getDrawable()) .getBitmap(); ByteArrayOutputStream imageByteStream = new ByteArrayOutputStream(); imageBitmap.compress(Bitmap.CompressFormat.PNG, 100, imageByteStream); if (mRowId == null) { long id = mDbHelper.insertItem(category, name, expired_date, imageByteStream); if (id > 0) { mRowId = id; } } else { mDbHelper.updateItem(mRowId, category, name, expired_date, imageByteStream); } } private void Resume_populateFields() { if (mRowId != null) { Cursor data = mDbHelper.fetchItem(mRowId); startManagingCursor(data); // load information from sqlite nameEdit.setText(data.getString(data .getColumnIndexOrThrow(FridgeDbAdapter.KEY_NAME))); categoryEdit.setText(data.getString(data .getColumnIndexOrThrow(FridgeDbAdapter.KEY_CATEGORY))); expired_Date_Btn.setText(data.getString(data .getColumnIndexOrThrow(FridgeDbAdapter.KEY_EXPIRED_DATE))); } else { // call display date when list is clicked expired_Date_Btn.setText(new StringBuilder().append(mDay) .append("/") // month is 0 based. Then add 1 .append(mMonth + 1).append("/").append(mYear).append(" ")); } }
0
9,309,696
02/16/2012 10:33:26
121,196
06/11/2009 09:33:59
1,982
16
http RewriteCond and RewriteRule
I need to rewrite url like http://www.xxx.com/search.php?abc to http://www.xx.com/abc using the rules below, but it doesn't work, why doesn't it match? <pre> RewriteCond %{REQUEST_URI} ^search.php RewriteRule ^search.php?q=([-0-9a-zA-Z]+) $1 </pre>
mod-rewrite
null
null
null
null
null
open
http RewriteCond and RewriteRule === I need to rewrite url like http://www.xxx.com/search.php?abc to http://www.xx.com/abc using the rules below, but it doesn't work, why doesn't it match? <pre> RewriteCond %{REQUEST_URI} ^search.php RewriteRule ^search.php?q=([-0-9a-zA-Z]+) $1 </pre>
0
7,616,840
09/30/2011 22:52:19
172,776
09/13/2009 16:02:52
677
12
What's a good resource for learning the in's and out's of UTF-8?
UTF-8 seems to be very prevalent these days. What would be a good resource or book to checkout to learn the essentials, necessary for any developer interested in knowing proper practices and inner workings of utf-8?
utf-8
books
null
null
null
10/02/2011 16:20:14
not constructive
What's a good resource for learning the in's and out's of UTF-8? === UTF-8 seems to be very prevalent these days. What would be a good resource or book to checkout to learn the essentials, necessary for any developer interested in knowing proper practices and inner workings of utf-8?
4
10,257,756
04/21/2012 09:27:30
625,528
02/20/2011 18:51:55
6
0
Creating a database using Access?
I recently tookover a non-profit program for senior citizens called "Meals on Wheels", perhaps your city has one too. Currently it is a very cumbersome routine of manually checking tags for each person who gets the meals and seeing if they can't eat certain things and what days of the week they get delivery. I would love to computerize this in order to eliminate not only mistakes but make it run faster and smoother. The tags contain names, address, foods they can't eat and days of the week. Is there a way to computerize this? We have a meal menu run on excel if that helps. I was advised to try using MS Access, but, I have never used it before, would this be the program we would need to do this? Thanks guys
database
null
null
null
null
04/23/2012 02:45:27
not a real question
Creating a database using Access? === I recently tookover a non-profit program for senior citizens called "Meals on Wheels", perhaps your city has one too. Currently it is a very cumbersome routine of manually checking tags for each person who gets the meals and seeing if they can't eat certain things and what days of the week they get delivery. I would love to computerize this in order to eliminate not only mistakes but make it run faster and smoother. The tags contain names, address, foods they can't eat and days of the week. Is there a way to computerize this? We have a meal menu run on excel if that helps. I was advised to try using MS Access, but, I have never used it before, would this be the program we would need to do this? Thanks guys
1
3,500,235
08/17/2010 07:30:59
422,552
08/17/2010 07:30:59
1
0
change the subversion in my project like 1.32.3
please give step by step answer because i am in learning stage.
tortoisesvn
null
null
null
null
08/18/2010 01:07:12
not a real question
change the subversion in my project like 1.32.3 === please give step by step answer because i am in learning stage.
1
2,922,747
05/27/2010 16:03:36
352,148
05/27/2010 16:03:36
1
0
required element content
I'm trying to create xsd for an element like this: <ElementType attr1="a" attr2 ="b">mandatory_string</ElementType> and I want to make the "mandatory_string" required. What should I add to this xsd: <xs:complexType name="ElementType"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="attr1" type="StringLength1to2" use="required"/> <xs:attribute name="attr2" type="StringLength1to2" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> Currently is optional. What's missing?
xsd
element
required
null
null
null
open
required element content === I'm trying to create xsd for an element like this: <ElementType attr1="a" attr2 ="b">mandatory_string</ElementType> and I want to make the "mandatory_string" required. What should I add to this xsd: <xs:complexType name="ElementType"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="attr1" type="StringLength1to2" use="required"/> <xs:attribute name="attr2" type="StringLength1to2" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> Currently is optional. What's missing?
0
9,016,594
01/26/2012 10:15:50
1,171,007
01/26/2012 10:05:35
1
0
Update DB field using Zend Framework
I'm a n00bie with Zend but I'm learning it. I want to update a field in the database using a button, but I don't know how to do it. This is what I wanna do: `UPDATE $table SET content_field=1 WHERE $id = contentId` For example if I press that button I wanna put a 1 in the field instead of a default 0.
mysql
zend-framework
null
null
null
null
open
Update DB field using Zend Framework === I'm a n00bie with Zend but I'm learning it. I want to update a field in the database using a button, but I don't know how to do it. This is what I wanna do: `UPDATE $table SET content_field=1 WHERE $id = contentId` For example if I press that button I wanna put a 1 in the field instead of a default 0.
0
3,989,958
10/21/2010 16:56:23
276,975
02/19/2010 13:20:10
126
1
game in an iphone: where to start
I'd like to develop a 2d game that's not gonna be very intensive with an iphone sdk. I don't want to use opengl and i don't want to use ano 3rd party things. So as i understand, i'll have to use a view's drawrect method to draw things. I've spent hours researching this topic and as always with apple's production - it just left me with even more questions. What i'd like to do is create some sort of offscreen bitmap and use it to paint things and then copy that bitmap onto a screen. Could someone give me a very very primitive example of how i could create an offscreen buffer (with the size of the screen), draw a png image on it and move it to the actual view? Or am i being too naive thinking there is a simple example for that? Thank you
iphone
cocoa-touch
null
null
null
10/22/2010 03:08:35
not a real question
game in an iphone: where to start === I'd like to develop a 2d game that's not gonna be very intensive with an iphone sdk. I don't want to use opengl and i don't want to use ano 3rd party things. So as i understand, i'll have to use a view's drawrect method to draw things. I've spent hours researching this topic and as always with apple's production - it just left me with even more questions. What i'd like to do is create some sort of offscreen bitmap and use it to paint things and then copy that bitmap onto a screen. Could someone give me a very very primitive example of how i could create an offscreen buffer (with the size of the screen), draw a png image on it and move it to the actual view? Or am i being too naive thinking there is a simple example for that? Thank you
1
2,978,306
06/04/2010 22:57:37
141,233
07/20/2009 07:58:25
94
13
How to post an album to a fan page
I admin a fan page. One of the fans created a photo album on his own page.<br/> I want to post it on the fan page, but in the album all have is "post the album to profile", and if I do it I get it in my own profile, not on the fan page. Any idea how to post the album to the fan page ?
facebook
page
fan
null
null
null
open
How to post an album to a fan page === I admin a fan page. One of the fans created a photo album on his own page.<br/> I want to post it on the fan page, but in the album all have is "post the album to profile", and if I do it I get it in my own profile, not on the fan page. Any idea how to post the album to the fan page ?
0
4,674,988
01/12/2011 22:57:19
64,586
02/10/2009 14:32:53
1,596
73
Hidden UIView Orientation Change / Layout problems
**The Problem:** I have two View Controllers loaded into a root View Controller. Both sub view layouts respond to orientation changes. I switch between the two views using [UIView transformationFromView:...]. Both sub views work fine on their own, but if... 1. Views are swapped 2. Orientation Changes 3. Views are swapped again the View that was previously hidden has serious layout problems. The more I repeat these steps the worse the problem gets. **Implementation Details** I have three viewsControllers. 1. MyAppViewController 2. A_ViewController 3. B_ViewController A & B ViewControllers have a background image each, and a UIWebView and an AQGridView respectively. To give you an example of how i'm setting it all up, here's the loadView method for A_ViewController... - (void)loadView { [super loadView]; // background image // Should fill the screen and resize on orientation changes UIImageView *bg = [[UIImageView alloc] initWithFrame:self.view.bounds]; bg.contentMode = UIViewContentModeCenter; bg.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; bg.image = [UIImage imageNamed:@"fuzzyhalo.png"]; [self.view addSubview:bg]; // frame for webView // Should have a margin of 34 on all sides and resize on orientation changes CGRect webFrame = self.view.bounds; webFrame.origin.x = 34; webFrame.origin.y = 34; webFrame.size.width = webFrame.size.width - 68; webFrame.size.height = webFrame.size.height - 68; projectView = [[UIWebView alloc] initWithFrame:webFrame]; projectView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; [self.view addSubview:projectView]; } For the sake of brevity, the AQGridView in B_ViewController is set up pretty much the same way. Now both these views work fine on their own. However, I use both of them in the AppViewController like this... - (void)loadView { [super loadView]; self.view.autoresizesSubviews = YES; [self setWantsFullScreenLayout:YES]; webView = [[WebProjectViewController alloc] init]; [self.view addSubview:webView.view]; mainMenu = [[GridViewController alloc] init]; [self.view addSubview:mainMenu.view]; activeView = mainMenu; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(switchViews:) name:SWAPVIEWS object:nil]; } and I switch betweem the two views using my own switchView method like this - (void) switchViews:(NSNotification*)aNotification; { NSString *type = [aNotification object]; if ([type isEqualToString:MAINMENU]){ [UIView transitionFromView:activeView.view toView:mainMenu.view duration:0.75 options:UIViewAnimationOptionTransitionFlipFromRight completion:nil]; activeView = mainMenu; } if ([type isEqualToString:WEBVIEW]) { [UIView transitionFromView:activeView.view toView:webView.view duration:0.75 options:UIViewAnimationOptionTransitionFlipFromLeft completion:nil]; activeView = webView; } // These don't seem to do anything //[mainMenu.view setNeedsLayout]; //[webView.view setNeedsLayout]; } I'm fumbling my way through this, and I suspect a lot of what i've done is implemented incorrectly so please feel free to point out anything that should be done differently, I need the input. But my primary concern is to understand what's causing the layout problems. Here's two images which illustrate the nature of the layout issues... ![Normal Layout][1] Switch to the other view... change orientation.... switch back.... ![Problem Layout][2] [1]: http://i.stack.imgur.com/qN9AW.png [2]: http://i.stack.imgur.com/uMnwN.png
ios
uiviewcontroller
orientation
null
null
null
open
Hidden UIView Orientation Change / Layout problems === **The Problem:** I have two View Controllers loaded into a root View Controller. Both sub view layouts respond to orientation changes. I switch between the two views using [UIView transformationFromView:...]. Both sub views work fine on their own, but if... 1. Views are swapped 2. Orientation Changes 3. Views are swapped again the View that was previously hidden has serious layout problems. The more I repeat these steps the worse the problem gets. **Implementation Details** I have three viewsControllers. 1. MyAppViewController 2. A_ViewController 3. B_ViewController A & B ViewControllers have a background image each, and a UIWebView and an AQGridView respectively. To give you an example of how i'm setting it all up, here's the loadView method for A_ViewController... - (void)loadView { [super loadView]; // background image // Should fill the screen and resize on orientation changes UIImageView *bg = [[UIImageView alloc] initWithFrame:self.view.bounds]; bg.contentMode = UIViewContentModeCenter; bg.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; bg.image = [UIImage imageNamed:@"fuzzyhalo.png"]; [self.view addSubview:bg]; // frame for webView // Should have a margin of 34 on all sides and resize on orientation changes CGRect webFrame = self.view.bounds; webFrame.origin.x = 34; webFrame.origin.y = 34; webFrame.size.width = webFrame.size.width - 68; webFrame.size.height = webFrame.size.height - 68; projectView = [[UIWebView alloc] initWithFrame:webFrame]; projectView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; [self.view addSubview:projectView]; } For the sake of brevity, the AQGridView in B_ViewController is set up pretty much the same way. Now both these views work fine on their own. However, I use both of them in the AppViewController like this... - (void)loadView { [super loadView]; self.view.autoresizesSubviews = YES; [self setWantsFullScreenLayout:YES]; webView = [[WebProjectViewController alloc] init]; [self.view addSubview:webView.view]; mainMenu = [[GridViewController alloc] init]; [self.view addSubview:mainMenu.view]; activeView = mainMenu; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(switchViews:) name:SWAPVIEWS object:nil]; } and I switch betweem the two views using my own switchView method like this - (void) switchViews:(NSNotification*)aNotification; { NSString *type = [aNotification object]; if ([type isEqualToString:MAINMENU]){ [UIView transitionFromView:activeView.view toView:mainMenu.view duration:0.75 options:UIViewAnimationOptionTransitionFlipFromRight completion:nil]; activeView = mainMenu; } if ([type isEqualToString:WEBVIEW]) { [UIView transitionFromView:activeView.view toView:webView.view duration:0.75 options:UIViewAnimationOptionTransitionFlipFromLeft completion:nil]; activeView = webView; } // These don't seem to do anything //[mainMenu.view setNeedsLayout]; //[webView.view setNeedsLayout]; } I'm fumbling my way through this, and I suspect a lot of what i've done is implemented incorrectly so please feel free to point out anything that should be done differently, I need the input. But my primary concern is to understand what's causing the layout problems. Here's two images which illustrate the nature of the layout issues... ![Normal Layout][1] Switch to the other view... change orientation.... switch back.... ![Problem Layout][2] [1]: http://i.stack.imgur.com/qN9AW.png [2]: http://i.stack.imgur.com/uMnwN.png
0
4,557,861
12/29/2010 21:07:26
130,204
06/29/2009 00:57:25
379
12
JQuery: Run animations on the element's contents
I have a div that has some padding, border, and style applied to it. Inside the div I have just some plain text. Something like this: <div id=test style="border: 2px solid black; background-color: blue;"> The text I would like to animate </div> Normally to animate the contents I would do something like this: `$(#test > *).hide(1000);` But apparently the `> *` only selects child elements, and not non-elements (text for example) So my current work around is: <div id=test style="border: 2px solid black; background-color: blue;"> <span>The text I would like to animate</span> </div> Making a `span` that is not really needed.
jquery
hide
animate
selector
child
null
open
JQuery: Run animations on the element's contents === I have a div that has some padding, border, and style applied to it. Inside the div I have just some plain text. Something like this: <div id=test style="border: 2px solid black; background-color: blue;"> The text I would like to animate </div> Normally to animate the contents I would do something like this: `$(#test > *).hide(1000);` But apparently the `> *` only selects child elements, and not non-elements (text for example) So my current work around is: <div id=test style="border: 2px solid black; background-color: blue;"> <span>The text I would like to animate</span> </div> Making a `span` that is not really needed.
0
10,334,546
04/26/2012 13:33:24
417,675
08/11/2010 19:59:25
327
27
Send JSON to PHP as part of form
I have a complicated form with some inputs and textareas that allow the user to create a calendar item. I also have a popup that let's them link activities to the item and another popup that lets them link predefined targets to an activity. Activities and links between targets and activities should only be saved when the calendar item is saved I was thinking of handling all the popup stuff by saving the data in a JSON object. That object should then be sent to the PHP file handling the form submit. I do *not* want to send the JSON using Ajax, I need it to be part of the form. I was thinking of simply adding a hidden textarea with json data in it and using `json_decode()` in my page, but I'm wondering if there are better approaches.
php
jquery
json
null
null
null
open
Send JSON to PHP as part of form === I have a complicated form with some inputs and textareas that allow the user to create a calendar item. I also have a popup that let's them link activities to the item and another popup that lets them link predefined targets to an activity. Activities and links between targets and activities should only be saved when the calendar item is saved I was thinking of handling all the popup stuff by saving the data in a JSON object. That object should then be sent to the PHP file handling the form submit. I do *not* want to send the JSON using Ajax, I need it to be part of the form. I was thinking of simply adding a hidden textarea with json data in it and using `json_decode()` in my page, but I'm wondering if there are better approaches.
0
3,004,795
06/09/2010 10:04:24
318,333
04/16/2010 09:02:26
1
0
How long will it take a coder to learn ruby?
How long will it take for a developer to learn ruby. And develop a production website like stackoverflow ? Normally. If the developer have .NET experience but no ruby and MYSQL or PostgreSQL experience.
ruby
null
null
null
null
06/10/2010 17:22:33
not a real question
How long will it take a coder to learn ruby? === How long will it take for a developer to learn ruby. And develop a production website like stackoverflow ? Normally. If the developer have .NET experience but no ruby and MYSQL or PostgreSQL experience.
1
10,639,443
05/17/2012 16:13:54
1,265,313
03/12/2012 23:38:24
6
0
Eclipse complaining about Java errors that don't exist
I have this code in eclipse: db.execSQL("CREATE TABLE " + easyTable " (" + colID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + colName + " TEXT, " + colScore + " INTEGER);"; and Eclipse refuses to compile the code because: > Multiple markers at this line - Syntax error on token "" ("", delete this token - Syntax error, insert ")" to complete Expression I'm sure the code is correct though - I just ran it manually on an SQL server and it ran fine. Can I override this error?
java
eclipse
sqlite
null
null
06/06/2012 14:36:02
too localized
Eclipse complaining about Java errors that don't exist === I have this code in eclipse: db.execSQL("CREATE TABLE " + easyTable " (" + colID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + colName + " TEXT, " + colScore + " INTEGER);"; and Eclipse refuses to compile the code because: > Multiple markers at this line - Syntax error on token "" ("", delete this token - Syntax error, insert ")" to complete Expression I'm sure the code is correct though - I just ran it manually on an SQL server and it ran fine. Can I override this error?
3
3,894,832
10/08/2010 22:51:17
332,957
05/05/2010 00:51:01
36
0
ASP.NET EntityFramework 4 data context issues
I'm working on a site and there are two projects in the solution a business logic project and the website project. I understand that I want to keep the entity context out of the web project and only use the business objects the framework creates but I can't figure out how to save a modified object this way. Let's say my entity model created this class: public class Person //Person entity { Int32 Id {get;set;} String Name {get;set;} Address Address {get;set;} //Address entity } And I created this class to get a specific person: public static class PersonController { public static Person GetById(int id) { using (Entities context = new Entities()) { return context.Persons.FirstOrDefault(x => x.Id == id); } } } This allows me to get a person without a context by calling PersonController.GetById(1); and I can change the persons properties after I get them but I can't figure out how to save the modified information back to the database. Ideally I would like to partial class Person and add a .Save() method which would handle creating a context adding the person to it and saving the changes. But when I tried this a while ago there were all kinds of issues with it still being attached to the old context and even if I detatch it and attatch it to a new context it gets attached as EntityState.Unchanged, if I remember right, so when I call context.SaveChages() after attaching it nothing actually gets updated. I guess I have two questions: 1) Am I going about this in a good way/is there a better way? If I'm doing this in a really terrible way I would appreciate some psudo-code to point me in the right direction; a link to a post explaining how to go about this type of thing would work just as well. 2) Can someone provide some psudo-code for a save method? The save method would also need to handle if an address was attached or removed.
asp.net
entity-framework-4
null
null
null
null
open
ASP.NET EntityFramework 4 data context issues === I'm working on a site and there are two projects in the solution a business logic project and the website project. I understand that I want to keep the entity context out of the web project and only use the business objects the framework creates but I can't figure out how to save a modified object this way. Let's say my entity model created this class: public class Person //Person entity { Int32 Id {get;set;} String Name {get;set;} Address Address {get;set;} //Address entity } And I created this class to get a specific person: public static class PersonController { public static Person GetById(int id) { using (Entities context = new Entities()) { return context.Persons.FirstOrDefault(x => x.Id == id); } } } This allows me to get a person without a context by calling PersonController.GetById(1); and I can change the persons properties after I get them but I can't figure out how to save the modified information back to the database. Ideally I would like to partial class Person and add a .Save() method which would handle creating a context adding the person to it and saving the changes. But when I tried this a while ago there were all kinds of issues with it still being attached to the old context and even if I detatch it and attatch it to a new context it gets attached as EntityState.Unchanged, if I remember right, so when I call context.SaveChages() after attaching it nothing actually gets updated. I guess I have two questions: 1) Am I going about this in a good way/is there a better way? If I'm doing this in a really terrible way I would appreciate some psudo-code to point me in the right direction; a link to a post explaining how to go about this type of thing would work just as well. 2) Can someone provide some psudo-code for a save method? The save method would also need to handle if an address was attached or removed.
0
5,237,452
03/08/2011 19:46:46
336,085
05/08/2010 09:00:54
1
0
Reading from file while ignoring parentheses
I have seen similar question, but not the same situation.
c++
null
null
null
null
03/09/2011 00:42:59
not a real question
Reading from file while ignoring parentheses === I have seen similar question, but not the same situation.
1
6,729,590
07/18/2011 07:04:37
669,995
03/21/2011 18:59:17
26
1
How to do image size validation using javascript?
I have to do image size validation using javascript. I need to store the values like 5X4 or something. i have done alert for, if there is not "X" in this field it'll show as alert as your values should be "(eg)7X4" in this format. if(inputVal.indexOf("X")==-1) { $('#erSize').append("*Size should be (e.g) 6X4"); } but the problem is its accepting aXg also, how to check the values entered between "X" are only integers?
javascript
string
manipulation
null
null
null
open
How to do image size validation using javascript? === I have to do image size validation using javascript. I need to store the values like 5X4 or something. i have done alert for, if there is not "X" in this field it'll show as alert as your values should be "(eg)7X4" in this format. if(inputVal.indexOf("X")==-1) { $('#erSize').append("*Size should be (e.g) 6X4"); } but the problem is its accepting aXg also, how to check the values entered between "X" are only integers?
0
7,864,869
10/23/2011 07:14:05
176,824
09/21/2009 21:57:06
99
1
Using awk for conditional find/replace
I want to solve a common but very specific problem: due to OCR errors, a lot of subtitle files contain the character "I" (upper case i) instead of "l" (lower case L). My plan of attack is: 1. Process the file word by word 2. Pass each word to the hunspell spellchecker ("echo the-word | hunspell -l" produces no response at all if it is valid, and a response if it is bad) 3. If it is a bad word, AND it has uppercase Is in it, then replace these with lowercase l and try again. If it is now a valid word, replace the original word. I could certainly tokenize and reconstruct the entire file in a script, but before I go down that path I was wondering if it is possible to use awk and/or sed for these kinds of conditional operations at the word-level? Any other suggested approaches would also be very welcome! Thanking you in advance.
bash
sed
awk
hunspell
spellcheck
null
open
Using awk for conditional find/replace === I want to solve a common but very specific problem: due to OCR errors, a lot of subtitle files contain the character "I" (upper case i) instead of "l" (lower case L). My plan of attack is: 1. Process the file word by word 2. Pass each word to the hunspell spellchecker ("echo the-word | hunspell -l" produces no response at all if it is valid, and a response if it is bad) 3. If it is a bad word, AND it has uppercase Is in it, then replace these with lowercase l and try again. If it is now a valid word, replace the original word. I could certainly tokenize and reconstruct the entire file in a script, but before I go down that path I was wondering if it is possible to use awk and/or sed for these kinds of conditional operations at the word-level? Any other suggested approaches would also be very welcome! Thanking you in advance.
0
911,073
05/26/2009 14:43:00
91,607
04/16/2009 12:44:26
72
2
a Process hidden from the Process Monitor
I need to create an application which will be reading and writing to files(C++/MFC). but I need the process not to appear in process monitor (which comes with SysInternals). thanks
mfc
null
null
null
null
05/26/2009 17:13:53
off topic
a Process hidden from the Process Monitor === I need to create an application which will be reading and writing to files(C++/MFC). but I need the process not to appear in process monitor (which comes with SysInternals). thanks
2
6,632,153
07/09/2011 01:40:59
455,615
02/13/2010 20:03:14
2,411
58
Reflection for nested classes
I see that most people who have been playing with ScalaSigParser, in an effort to ser/des idiomatic Scala case classes in a nice way, have avoided this issue, but I'd like to know if it's possible. I have a situation much like the following: trait OuterTrait { abstract class InnerAbstract(i: Int) } object OuterObject extends OuterTrait { case class InnerConcrete(i: Int) extends InnerAbstract(i) } val bippy = OuterObject.InnerConcrete(123) val s = serialize(bippy) // time passes... val obj = deserialize[OuterObject.InnerConcrete](s) So, I can find the ScalaSig for OuterTrait, but I haven't managed to find a nice general way to identify the outer object from the InnerConcrete class. Any protips?
scala
reflection
nested-class
null
null
null
open
Reflection for nested classes === I see that most people who have been playing with ScalaSigParser, in an effort to ser/des idiomatic Scala case classes in a nice way, have avoided this issue, but I'd like to know if it's possible. I have a situation much like the following: trait OuterTrait { abstract class InnerAbstract(i: Int) } object OuterObject extends OuterTrait { case class InnerConcrete(i: Int) extends InnerAbstract(i) } val bippy = OuterObject.InnerConcrete(123) val s = serialize(bippy) // time passes... val obj = deserialize[OuterObject.InnerConcrete](s) So, I can find the ScalaSig for OuterTrait, but I haven't managed to find a nice general way to identify the outer object from the InnerConcrete class. Any protips?
0
9,922,055
03/29/2012 08:53:39
1,300,271
03/29/2012 08:40:10
1
0
how to find the <SQL Server Logins> for a domain user who have accessed db? (there are several sql logins by "windows user group")
there are several sql logins which are created from "windows user group". when a client connect to sql server via "windows authentication", how to confirm this client belong to a "windows user group"? thanks for any help.
sql
windows
authentication
server
null
null
open
how to find the <SQL Server Logins> for a domain user who have accessed db? (there are several sql logins by "windows user group") === there are several sql logins which are created from "windows user group". when a client connect to sql server via "windows authentication", how to confirm this client belong to a "windows user group"? thanks for any help.
0
16,298
08/19/2008 14:42:29
117
08/02/2008 05:54:20
546
25
How to redirect siteA to siteB with A or CNAME records
I have 2 hosts and I would like to point a subdomain on host one to a subdomain on host two: subdomain.hostone.com --> subdomain.hosttwo.com I added a CNAME record to host one that points to subdomain.hosttwo.com but all I get is a '**400 Bad Request**' Error. Can anyone see what I'm doing wrong?
dns
cname
webhosting
null
null
06/20/2012 14:43:22
off topic
How to redirect siteA to siteB with A or CNAME records === I have 2 hosts and I would like to point a subdomain on host one to a subdomain on host two: subdomain.hostone.com --> subdomain.hosttwo.com I added a CNAME record to host one that points to subdomain.hosttwo.com but all I get is a '**400 Bad Request**' Error. Can anyone see what I'm doing wrong?
2
294,707
11/17/2008 01:43:15
19,687
09/20/2008 16:29:52
484
29
How Do Multiple IPs for on Domain Handle Failed IPs?
I am trying to coordinate the move of a site from its current server to a new one. My original plan was to migrate the data to the new machine, which is already in place and the migration scripts tested successfully. I was planning to configure the original machine to proxy all requests to the new one, in order to ensure that anyone hitting the original machine before the DNS change fully propagates will still get proper response. Someone made an alternative suggestion that I add the records for the new machine, without it actually serving any content. I was told that, under these circumstances, traffic would all hit the original IP. When the new records propagate, I am told I can turn off the old server and bring up the new server. I'm skeptical of trying this and having my migration in a half-way mode. Should I even attempt it or just stick to my original plan?
dns
null
null
null
null
null
open
How Do Multiple IPs for on Domain Handle Failed IPs? === I am trying to coordinate the move of a site from its current server to a new one. My original plan was to migrate the data to the new machine, which is already in place and the migration scripts tested successfully. I was planning to configure the original machine to proxy all requests to the new one, in order to ensure that anyone hitting the original machine before the DNS change fully propagates will still get proper response. Someone made an alternative suggestion that I add the records for the new machine, without it actually serving any content. I was told that, under these circumstances, traffic would all hit the original IP. When the new records propagate, I am told I can turn off the old server and bring up the new server. I'm skeptical of trying this and having my migration in a half-way mode. Should I even attempt it or just stick to my original plan?
0
124,035
09/23/2008 21:31:24
4,615
09/04/2008 20:36:16
322
29
Are ruby command line switches -rubygems & -r incompatible?
I recently converted a ruby library to a gem, which seemed to break the command line usability Worked fine as a library $ ruby -r foobar -e 'p FooBar.question' # => "answer" And as a gem, irb knows how to require a gem from command-line switches $ irb -rubygems -r foobar irb(main):001:0> FooBar.question # => "answer" But the same fails for ruby itself: $ ruby -rubygems -r foobar -e 'p FooBar.question' ruby: no such file to load -- foobar (LoadError) must I now do this, which seems ugly: ruby -rubygems -e 'require "foobar"; p FooBar.question' # => "answer" Or is there a way to make the 2 switches work? *Note*: I know the gem could add a bin/program for every useful method but I don't like to pollute the command line namespace unnecessarily
ruby
rubygems
null
null
null
null
open
Are ruby command line switches -rubygems & -r incompatible? === I recently converted a ruby library to a gem, which seemed to break the command line usability Worked fine as a library $ ruby -r foobar -e 'p FooBar.question' # => "answer" And as a gem, irb knows how to require a gem from command-line switches $ irb -rubygems -r foobar irb(main):001:0> FooBar.question # => "answer" But the same fails for ruby itself: $ ruby -rubygems -r foobar -e 'p FooBar.question' ruby: no such file to load -- foobar (LoadError) must I now do this, which seems ugly: ruby -rubygems -e 'require "foobar"; p FooBar.question' # => "answer" Or is there a way to make the 2 switches work? *Note*: I know the gem could add a bin/program for every useful method but I don't like to pollute the command line namespace unnecessarily
0
11,669,683
07/26/2012 12:49:43
1,467,269
06/19/2012 18:29:51
6
0
rare code or foreign coding
im currently working with base64 code, and Im interested in any other code types, possibly foreign code kinds, that are used only within certain areas or countries. Reason I ask is my work is based on converting images into code then converting that into another code or language. thanks
unicode
null
null
null
null
07/26/2012 12:58:52
not a real question
rare code or foreign coding === im currently working with base64 code, and Im interested in any other code types, possibly foreign code kinds, that are used only within certain areas or countries. Reason I ask is my work is based on converting images into code then converting that into another code or language. thanks
1
5,415,957
03/24/2011 07:21:31
674,462
03/24/2011 07:21:31
1
0
h.264 file read and parse
how do we read a h.264 file into an array and parse it?
c++
c
null
null
null
03/24/2011 09:07:26
not a real question
h.264 file read and parse === how do we read a h.264 file into an array and parse it?
1
6,554,481
07/02/2011 01:00:18
651,174
03/09/2011 08:26:41
347
8
How to see if a value or object is in a QuerySet field
How would I see if a value is in a QuerySet? For example, if I have the following model: class UserProfile(models.Model): user = models.ForeignKey(User, unique=True) first_name = models.CharField(max_length=50) How would I find out if the first_name 'David' is contained in a QuerySet? A way to do the following: ld = UserProfile.objects.filter(...).values('first_name') >>> for object in ld: ... if object['first_name'] =='David': ... print True Or if a particular user object is instead? Something like `'David' in QuerySet['first_name']` ? Thank you.
django
null
null
null
null
null
open
How to see if a value or object is in a QuerySet field === How would I see if a value is in a QuerySet? For example, if I have the following model: class UserProfile(models.Model): user = models.ForeignKey(User, unique=True) first_name = models.CharField(max_length=50) How would I find out if the first_name 'David' is contained in a QuerySet? A way to do the following: ld = UserProfile.objects.filter(...).values('first_name') >>> for object in ld: ... if object['first_name'] =='David': ... print True Or if a particular user object is instead? Something like `'David' in QuerySet['first_name']` ? Thank you.
0
3,245,218
07/14/2010 10:24:36
391,442
07/14/2010 10:24:35
1
0
Help me choose Java web framework
I was C++ WinForms developer and then I swiched to Java Swing. Now I need to do web application, but I have strong background of GUI development so I want to **put it in use**. So I was looking for some nice Java-based frameworks, and two of them appear to be the thing what I am searching for : - Apache Wicket - Google Web Toolkit Here are things that I expect from framework : - Pure Java (no Scala, Groovy or whatever!) - More Java coding, less XML configuring - **Component-based** (similar to GUI logic) - Nice tutorials/books for framework - Eclipse/NetBeans plugins or support (no MyEclipse or any derviations only) - Hibernate(or JPA) friendly What of these (or is there another?) suits best for me and why do you think so?
java
gwt
wicket
null
null
07/15/2010 01:20:16
too localized
Help me choose Java web framework === I was C++ WinForms developer and then I swiched to Java Swing. Now I need to do web application, but I have strong background of GUI development so I want to **put it in use**. So I was looking for some nice Java-based frameworks, and two of them appear to be the thing what I am searching for : - Apache Wicket - Google Web Toolkit Here are things that I expect from framework : - Pure Java (no Scala, Groovy or whatever!) - More Java coding, less XML configuring - **Component-based** (similar to GUI logic) - Nice tutorials/books for framework - Eclipse/NetBeans plugins or support (no MyEclipse or any derviations only) - Hibernate(or JPA) friendly What of these (or is there another?) suits best for me and why do you think so?
3
8,679,705
12/30/2011 13:03:25
1,113,447
12/23/2011 13:00:52
28
1
How can i use a Chronometer to countup and display on multiple textviews?
Im just wondering if it is possible, i managed to get the chronometer working with a blank textview but it is beyond my current knowledge of how to get the output to display on seperate textviews, 1 textview for the hour digits, 1 for minute digits and 1 for seconds. (00:00:00) final Chronometer stopWatch = (Chronometer) findViewById(R.id.chrono); startTime = SystemClock.elapsedRealtime(); textGoesHere = (TextView) findViewById(R.id.textGoesHere); stopWatch.setOnChronometerTickListener(new OnChronometerTickListener(){ public void onChronometerTick(Chronometer arg0) { countUp = (SystemClock.elapsedRealtime() - arg0.getBase()) / 1000; String asText = (countUp / 60) + ":" + (countUp % 60); textGoesHere.setText(asText); } }); final ImageButton startButton = (ImageButton) findViewById(R.id.startButton); startButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { // Perform action on clicks stopWatch.start(); Toast.makeText(UsefulToolsActivity.this, "Start Stopwatch", Toast.LENGTH_SHORT).show(); } }); Is this even possible with a chronometer as currently it only displays seconds and minutes? I was also wondering whether it is possible to add milliseconds as a seperate textview (00:00:00.0)?
android
textview
chronometer
null
null
null
open
How can i use a Chronometer to countup and display on multiple textviews? === Im just wondering if it is possible, i managed to get the chronometer working with a blank textview but it is beyond my current knowledge of how to get the output to display on seperate textviews, 1 textview for the hour digits, 1 for minute digits and 1 for seconds. (00:00:00) final Chronometer stopWatch = (Chronometer) findViewById(R.id.chrono); startTime = SystemClock.elapsedRealtime(); textGoesHere = (TextView) findViewById(R.id.textGoesHere); stopWatch.setOnChronometerTickListener(new OnChronometerTickListener(){ public void onChronometerTick(Chronometer arg0) { countUp = (SystemClock.elapsedRealtime() - arg0.getBase()) / 1000; String asText = (countUp / 60) + ":" + (countUp % 60); textGoesHere.setText(asText); } }); final ImageButton startButton = (ImageButton) findViewById(R.id.startButton); startButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { // Perform action on clicks stopWatch.start(); Toast.makeText(UsefulToolsActivity.this, "Start Stopwatch", Toast.LENGTH_SHORT).show(); } }); Is this even possible with a chronometer as currently it only displays seconds and minutes? I was also wondering whether it is possible to add milliseconds as a seperate textview (00:00:00.0)?
0
5,403,645
03/23/2011 10:14:59
579,907
01/18/2011 12:12:32
6
0
How to match the pattern between a specified characters..
I have a fix message delimeted by "|"... tag=value is the pair between the delimeter; > (8=FIX.4.2|9=0360|35=8|49=BLPFT|56=ESP|34=8415|52=20110201-15:59:59|50=MBA|143=LN|115=MSET|57=2457172|30=CHIX|60=20110201-15:59:59.121|150=1|31=56.3100|151=71785|32=137|6=56.4058|37=9D9ZIhgu4BGU9sBtfHcYeQA|38=97370|39=1|40=1|11=20110201-05529|12=0.0012|13=2|14=25585|15=EUR|76=CHIXCCP|17=272674|47=A|167=CS|18=1|48=FR0000131104|20=0|21=1|22=4|113=N|54=1|55=BNP|207=FP|29=1|59=0|10=205|) How to extract a data between "11=" and a first occurance of "|" after a match... For example i want a data > 20110201-05529 which is between "|11=" and "|" Can you please tell me the regular expression
perl
null
null
null
null
null
open
How to match the pattern between a specified characters.. === I have a fix message delimeted by "|"... tag=value is the pair between the delimeter; > (8=FIX.4.2|9=0360|35=8|49=BLPFT|56=ESP|34=8415|52=20110201-15:59:59|50=MBA|143=LN|115=MSET|57=2457172|30=CHIX|60=20110201-15:59:59.121|150=1|31=56.3100|151=71785|32=137|6=56.4058|37=9D9ZIhgu4BGU9sBtfHcYeQA|38=97370|39=1|40=1|11=20110201-05529|12=0.0012|13=2|14=25585|15=EUR|76=CHIXCCP|17=272674|47=A|167=CS|18=1|48=FR0000131104|20=0|21=1|22=4|113=N|54=1|55=BNP|207=FP|29=1|59=0|10=205|) How to extract a data between "11=" and a first occurance of "|" after a match... For example i want a data > 20110201-05529 which is between "|11=" and "|" Can you please tell me the regular expression
0
3,761,949
09/21/2010 15:40:03
435,951
05/05/2010 03:08:39
216
2
How to create an EngineYard-like service for other languages?
Does anyone know what is needed to create an EngineYard-like service for other languages? Where should one start? Thanks
javascript
ruby-on-rails
ruby-on-rails3
heroku
null
09/24/2010 02:39:01
off topic
How to create an EngineYard-like service for other languages? === Does anyone know what is needed to create an EngineYard-like service for other languages? Where should one start? Thanks
2
5,180,178
03/03/2011 11:34:54
642,892
03/03/2011 11:34:54
1
0
which is the best book for visual programming beginners?
I am familiar with C and C++ but have never done any kind of Visual programming .I would really appreciate it if you guys could recommend the best visual programming book for a beginner like me .
books
null
null
null
null
09/22/2011 12:28:21
not constructive
which is the best book for visual programming beginners? === I am familiar with C and C++ but have never done any kind of Visual programming .I would really appreciate it if you guys could recommend the best visual programming book for a beginner like me .
4
11,375,967
07/07/2012 14:47:19
1,508,409
07/07/2012 07:38:03
5
0
syntax error, unexpected '}' - weird
I'm using the code down below to delete old files, but it keep saying: syntax error, unexpected '}' , but i can t spot where , please help me fix it.. function destroy($dir) { $mydir = opendir($dir); while($file = readdir($dir)) { if($file != "." && $file != "..") { chmod($dir.$file, 0777); if(is_dir($dir.$file)) { chdir('.'); while($dir.$file) { if(date("U",filectime($file) >= time() - 3600) { unlink($dir.$file) } } } else unlink($dir.$file) or DIE("couldn't delete $dir$file<br />"); } } closedir($dir); }
php
null
null
null
null
07/07/2012 21:48:34
too localized
syntax error, unexpected '}' - weird === I'm using the code down below to delete old files, but it keep saying: syntax error, unexpected '}' , but i can t spot where , please help me fix it.. function destroy($dir) { $mydir = opendir($dir); while($file = readdir($dir)) { if($file != "." && $file != "..") { chmod($dir.$file, 0777); if(is_dir($dir.$file)) { chdir('.'); while($dir.$file) { if(date("U",filectime($file) >= time() - 3600) { unlink($dir.$file) } } } else unlink($dir.$file) or DIE("couldn't delete $dir$file<br />"); } } closedir($dir); }
3
9,972,887
04/02/2012 08:10:20
528,929
12/03/2010 04:57:48
55
0
How to deal with dynamic allocated arrays with mpi?
I read [this code][1] which is an implementation of `matrix multiplication` using `MPI` and would like to change a bit for general use:read data from an input file(e.g. input.txt) whose content is like this: 3 3 1 0 0 0 1 0 0 0 1 3 3 2 3 4 2 1 4 3 2 5 which represents Matrix A and B with their **rows,columns,data** respectively.And I hope the result to be print to some text file like `output.txt`.So the code is run like: mpirun -np 4 mpi_exec_file input.txt output.txt The problem is that the size has to be allocated dynamically. I used `one dimensional` array to simulate the matrix.</p> I first tried to allocate space for `A,B,C` in the `master processor`(taskid==0) however the other worker processor cannot recognize the allocated space and complains that the buffer size is `0`. <i>**Can MPI_bcast solve this problem?**</i> </p> Then I allocated the space just below `MPI_init`,now the workers recognize it but always treat value of array C to be `0`. ***What's wrong?***</p> The full content of the code is below: #include "mpi.h" #include <stdio.h> #include <stdlib.h> #define FROM_MASTER 1 #define FROM_WORKER 2 FILE *fp1,*fp2; double *a,*b,*c; int NRA,NCA,NRB,NCB; int main(int argc, char *argv[]) { int taskid, numworkers,tasknum; int source, dest,mtype, rows; int averow, extra, offset; int i, j, k, rc; MPI_Status status; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &taskid); MPI_Comm_size(MPI_COMM_WORLD, &tasknum); numworkers = tasknum - 1; fp1 = fopen(argv[1], "r"); if (fp1 == NULL) { printf("FILE cannot open.\n"); exit(1); } fscanf(fp1, "%d", &NRA); fscanf(fp1, "%d", &NCA); a=(double*)malloc(sizeof(double)*NRA*NCA); for(i=0; i<NRA; i++) { for(j=0; j<NCA; j++) { fscanf(fp1, "%lf", &a[i*NCA+j]); } } fscanf(fp1, "%d", &NRB); fscanf(fp1, "%d", &NCB); b=(double*)malloc(sizeof(double)*NRB*NCB); for(i=0; i<NRB; i++) { for(j=0; j<NCB; j++) { fscanf(fp1, "%lf", &b[i*NCB+j]); } } fclose(fp1); c=(double*)malloc(sizeof(double)*NRA*NCB); if (taskid == 0) { averow = NRA / numworkers; extra = NRA % numworkers; offset = 0; mtype = FROM_MASTER; for (dest = 1; dest <= numworkers; dest++) { rows = (dest <= extra) ? averow + 1 : averow; printf("Sending %d rows to task %d offset=%d\n", rows, dest, offset); MPI_Send(&offset, 1, MPI_INT, dest, mtype, MPI_COMM_WORLD); MPI_Send(&rows, 1, MPI_INT, dest, mtype, MPI_COMM_WORLD); MPI_Send(&(a[offset*NCA]), rows * NCA, MPI_DOUBLE, dest, mtype, MPI_COMM_WORLD); MPI_Send(&b, NRA * NCB, MPI_DOUBLE, dest, mtype, MPI_COMM_WORLD); offset = offset + rows; } mtype = FROM_WORKER; for (i = 1; i <= numworkers; i++) { source = i; MPI_Recv(&offset, 1, MPI_INT, source, mtype, MPI_COMM_WORLD, &status); MPI_Recv(&rows, 1, MPI_INT, source, mtype, MPI_COMM_WORLD, &status); MPI_Recv(&(c[offset*NCB]), rows * NCB, MPI_DOUBLE, source, mtype, MPI_COMM_WORLD, &status); printf("Received results from task %d\n", source); } fp2 = fopen(argv[2], "w"); fprintf(fp2, " %d\t%d\n",NRA,NCB); for (i = 0; i < NRA; i++) { for (j = 0; j < NCB; j++) fprintf(fp2, "%10.6f", c[i*NCB+j]); fprintf(fp2, "\n"); } fclose(fp2); } if (taskid != 0) { mtype = FROM_MASTER; MPI_Recv(&offset, 1, MPI_INT, 0, mtype, MPI_COMM_WORLD, &status); MPI_Recv(&rows, 1, MPI_INT, 0, mtype, MPI_COMM_WORLD, &status); MPI_Recv(&(a[0]), rows * NCA, MPI_DOUBLE, 0, mtype, MPI_COMM_WORLD, &status); MPI_Recv(&(b[0]), NCA * NCB, MPI_DOUBLE, 0, mtype, MPI_COMM_WORLD, &status); printf("%d received.\n",taskid); for (k = 0; k < NCB; k++) for (i = 0; i < rows; i++) { c[i*NCB+j] = 0.0; for (j = 0; j < NCA; j++) c[i*NCB+j] = c[i*NCB+k] + a[i*NCA+j] * b[j*NCB+k]; printf("%lf %d\n",c[i*NCB+j],taskid); } mtype = FROM_WORKER; MPI_Send(&offset, 1, MPI_INT, 0, mtype, MPI_COMM_WORLD); MPI_Send(&rows, 1, MPI_INT, 0, mtype, MPI_COMM_WORLD); MPI_Send(&(c[0]), rows * NCB, MPI_DOUBLE, 0, mtype, MPI_COMM_WORLD); } MPI_Finalize(); } [1]: http://www.nccs.gov/wp-content/training/mpi-examples/C/matmul.c
c
memory-management
mpi
null
null
null
open
How to deal with dynamic allocated arrays with mpi? === I read [this code][1] which is an implementation of `matrix multiplication` using `MPI` and would like to change a bit for general use:read data from an input file(e.g. input.txt) whose content is like this: 3 3 1 0 0 0 1 0 0 0 1 3 3 2 3 4 2 1 4 3 2 5 which represents Matrix A and B with their **rows,columns,data** respectively.And I hope the result to be print to some text file like `output.txt`.So the code is run like: mpirun -np 4 mpi_exec_file input.txt output.txt The problem is that the size has to be allocated dynamically. I used `one dimensional` array to simulate the matrix.</p> I first tried to allocate space for `A,B,C` in the `master processor`(taskid==0) however the other worker processor cannot recognize the allocated space and complains that the buffer size is `0`. <i>**Can MPI_bcast solve this problem?**</i> </p> Then I allocated the space just below `MPI_init`,now the workers recognize it but always treat value of array C to be `0`. ***What's wrong?***</p> The full content of the code is below: #include "mpi.h" #include <stdio.h> #include <stdlib.h> #define FROM_MASTER 1 #define FROM_WORKER 2 FILE *fp1,*fp2; double *a,*b,*c; int NRA,NCA,NRB,NCB; int main(int argc, char *argv[]) { int taskid, numworkers,tasknum; int source, dest,mtype, rows; int averow, extra, offset; int i, j, k, rc; MPI_Status status; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &taskid); MPI_Comm_size(MPI_COMM_WORLD, &tasknum); numworkers = tasknum - 1; fp1 = fopen(argv[1], "r"); if (fp1 == NULL) { printf("FILE cannot open.\n"); exit(1); } fscanf(fp1, "%d", &NRA); fscanf(fp1, "%d", &NCA); a=(double*)malloc(sizeof(double)*NRA*NCA); for(i=0; i<NRA; i++) { for(j=0; j<NCA; j++) { fscanf(fp1, "%lf", &a[i*NCA+j]); } } fscanf(fp1, "%d", &NRB); fscanf(fp1, "%d", &NCB); b=(double*)malloc(sizeof(double)*NRB*NCB); for(i=0; i<NRB; i++) { for(j=0; j<NCB; j++) { fscanf(fp1, "%lf", &b[i*NCB+j]); } } fclose(fp1); c=(double*)malloc(sizeof(double)*NRA*NCB); if (taskid == 0) { averow = NRA / numworkers; extra = NRA % numworkers; offset = 0; mtype = FROM_MASTER; for (dest = 1; dest <= numworkers; dest++) { rows = (dest <= extra) ? averow + 1 : averow; printf("Sending %d rows to task %d offset=%d\n", rows, dest, offset); MPI_Send(&offset, 1, MPI_INT, dest, mtype, MPI_COMM_WORLD); MPI_Send(&rows, 1, MPI_INT, dest, mtype, MPI_COMM_WORLD); MPI_Send(&(a[offset*NCA]), rows * NCA, MPI_DOUBLE, dest, mtype, MPI_COMM_WORLD); MPI_Send(&b, NRA * NCB, MPI_DOUBLE, dest, mtype, MPI_COMM_WORLD); offset = offset + rows; } mtype = FROM_WORKER; for (i = 1; i <= numworkers; i++) { source = i; MPI_Recv(&offset, 1, MPI_INT, source, mtype, MPI_COMM_WORLD, &status); MPI_Recv(&rows, 1, MPI_INT, source, mtype, MPI_COMM_WORLD, &status); MPI_Recv(&(c[offset*NCB]), rows * NCB, MPI_DOUBLE, source, mtype, MPI_COMM_WORLD, &status); printf("Received results from task %d\n", source); } fp2 = fopen(argv[2], "w"); fprintf(fp2, " %d\t%d\n",NRA,NCB); for (i = 0; i < NRA; i++) { for (j = 0; j < NCB; j++) fprintf(fp2, "%10.6f", c[i*NCB+j]); fprintf(fp2, "\n"); } fclose(fp2); } if (taskid != 0) { mtype = FROM_MASTER; MPI_Recv(&offset, 1, MPI_INT, 0, mtype, MPI_COMM_WORLD, &status); MPI_Recv(&rows, 1, MPI_INT, 0, mtype, MPI_COMM_WORLD, &status); MPI_Recv(&(a[0]), rows * NCA, MPI_DOUBLE, 0, mtype, MPI_COMM_WORLD, &status); MPI_Recv(&(b[0]), NCA * NCB, MPI_DOUBLE, 0, mtype, MPI_COMM_WORLD, &status); printf("%d received.\n",taskid); for (k = 0; k < NCB; k++) for (i = 0; i < rows; i++) { c[i*NCB+j] = 0.0; for (j = 0; j < NCA; j++) c[i*NCB+j] = c[i*NCB+k] + a[i*NCA+j] * b[j*NCB+k]; printf("%lf %d\n",c[i*NCB+j],taskid); } mtype = FROM_WORKER; MPI_Send(&offset, 1, MPI_INT, 0, mtype, MPI_COMM_WORLD); MPI_Send(&rows, 1, MPI_INT, 0, mtype, MPI_COMM_WORLD); MPI_Send(&(c[0]), rows * NCB, MPI_DOUBLE, 0, mtype, MPI_COMM_WORLD); } MPI_Finalize(); } [1]: http://www.nccs.gov/wp-content/training/mpi-examples/C/matmul.c
0
10,908,938
06/06/2012 06:05:43
1,429,987
06/01/2012 06:04:28
1
0
without indicate field name in php using mysql get all data
without indicate field name in php using mysql get data while ($row_data = mysql_fetch_assoc($res_data)) { $html .='<td>'.$row_data['without_fieldname'].'</td>'; }
php
mysql
ms-access-2007
null
null
06/23/2012 14:58:33
not a real question
without indicate field name in php using mysql get all data === without indicate field name in php using mysql get data while ($row_data = mysql_fetch_assoc($res_data)) { $html .='<td>'.$row_data['without_fieldname'].'</td>'; }
1
6,476,326
06/25/2011 06:46:33
779,709
06/01/2011 15:37:52
451
27
What should the frequently asked questions really include?
Sorry for intruding, I've been using SO for a while now and just recently started contributing by helping to answer questions. This is the first question I ever asked, and I wish I had a better way to approach it. The faqs section of the tag I usually watch sucks. It shows the most upvoted questions, not the ones asked repeatedly but never get upvoted, because the people who constantly ask them apparently suck. So I'm asking you all to help fix this. What are the FRA - the 'frequently replied answers?' instead? I wish there was a meta section for each tag, but alas there isn't. This really is a meta-Android thing. Please vote up the best FRAs you'd typically give to a beginner. I'll start - For the initial text in the question textarea that it seems most people ignore.... A: You probably have an exception. Post the stacktrace from logcat. If its a NullPointerException, 99.9999% of the time its your fault, and debug expressions and watches help. It actually might be because of your layout XML files - please post especially if said NPEs occur during a findViewById In that case, please post them as well. Regardless, give us at least a bit of pseudocode that _smartly_ expresses your actual problem. Real code helps us narrow down to a better answer. For info about 'smartly,' refer to http://www.catb.org/~esr/faqs/smart-questions.html.
android
null
null
null
null
06/25/2011 07:38:54
off topic
What should the frequently asked questions really include? === Sorry for intruding, I've been using SO for a while now and just recently started contributing by helping to answer questions. This is the first question I ever asked, and I wish I had a better way to approach it. The faqs section of the tag I usually watch sucks. It shows the most upvoted questions, not the ones asked repeatedly but never get upvoted, because the people who constantly ask them apparently suck. So I'm asking you all to help fix this. What are the FRA - the 'frequently replied answers?' instead? I wish there was a meta section for each tag, but alas there isn't. This really is a meta-Android thing. Please vote up the best FRAs you'd typically give to a beginner. I'll start - For the initial text in the question textarea that it seems most people ignore.... A: You probably have an exception. Post the stacktrace from logcat. If its a NullPointerException, 99.9999% of the time its your fault, and debug expressions and watches help. It actually might be because of your layout XML files - please post especially if said NPEs occur during a findViewById In that case, please post them as well. Regardless, give us at least a bit of pseudocode that _smartly_ expresses your actual problem. Real code helps us narrow down to a better answer. For info about 'smartly,' refer to http://www.catb.org/~esr/faqs/smart-questions.html.
2
2,244,778
02/11/2010 13:45:34
252,398
01/16/2010 23:25:15
18
11
Need algorithm for Sequence calculation
I am trying to find the solution for a problem where i have something like 1. A > B 2. B > C 3. B > D 4. C > D And I should get the answer as A > B > C > D. Conditions for this problem 1. The output will involve all the elements. 2. The problem will not have any bogus inputs. for example, (A>B) (C>D) is a bogus input, since we cannot determine the output. 3. The inputs can be of any size but never bogus and there will always be a solution to the problem. I need to find a solution for this optimally using Java Collections. Any tips/hints are welcome. Thanks in advance!
data-structures
analytical
homework
java
null
null
open
Need algorithm for Sequence calculation === I am trying to find the solution for a problem where i have something like 1. A > B 2. B > C 3. B > D 4. C > D And I should get the answer as A > B > C > D. Conditions for this problem 1. The output will involve all the elements. 2. The problem will not have any bogus inputs. for example, (A>B) (C>D) is a bogus input, since we cannot determine the output. 3. The inputs can be of any size but never bogus and there will always be a solution to the problem. I need to find a solution for this optimally using Java Collections. Any tips/hints are welcome. Thanks in advance!
0
3,150,667
06/30/2010 15:19:58
249,227
01/12/2010 20:25:28
31
2
Windows Phone 7 HTTP Upload, no AllowWriteStreamBuffering property available
I'm creating an HttpWebRequest and storing it inside of an HttpState object. When I go to set AllowWriteStreamBuffering property of the request to false, I see that no such property exists. The download counterpart, AllowReadStreamBuffering, is available. HttpState httpState = new HttpState(); httpState.request = (HttpWebRequest)HttpWebRequest.Create(this.remotepath); //this compiles httpState.request.AllowReadStreamBuffering = false; //this doesn't compile httpState.request.AllowWriteStreamBuffering = false; Am I doing something wrong here? Or is there really no way to specify the buffering property for the WriteStream in Windows Phone 7?
c#
silverlight-3.0
httpwebrequest
windows-phone-7
null
null
open
Windows Phone 7 HTTP Upload, no AllowWriteStreamBuffering property available === I'm creating an HttpWebRequest and storing it inside of an HttpState object. When I go to set AllowWriteStreamBuffering property of the request to false, I see that no such property exists. The download counterpart, AllowReadStreamBuffering, is available. HttpState httpState = new HttpState(); httpState.request = (HttpWebRequest)HttpWebRequest.Create(this.remotepath); //this compiles httpState.request.AllowReadStreamBuffering = false; //this doesn't compile httpState.request.AllowWriteStreamBuffering = false; Am I doing something wrong here? Or is there really no way to specify the buffering property for the WriteStream in Windows Phone 7?
0
7,590,984
09/28/2011 23:51:57
610,618
02/09/2011 23:53:00
57
0
Importing Excel data into DataGridView not possible using Windows 2010
Hi I have been trying to figure out this problem for the last couple of hours. My goal is to read in the path of an excel file (.xlsx) and then display that data in datagridview. I am using vb.net for visual studio 2010 and I am running Windows7. Ok so here is the problem: I am able to read in .xls files no problem, however if I try to read in the newer .xlsx files I get an exceptions. Below is my code. Note that I have commented out several different ways of reading in data from the excel file. ' gets the ordered data from excel and puts it into datagrid 'inputs: path - the path where the file is located gridValue - a flag to note which grid this data belongs to 1 = order data Private Function FillDataGrid_OrderData(ByVal path, ByVal gridValue) Dim MyConnection As System.Data.OleDb.OleDbConnection Dim DtSet As System.Data.DataSet Dim MyCommand As System.Data.OleDb.OleDbDataAdapter Dim filepath As String = path 'MyConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.14.0;Data Source=" + path + ";Extended Properties=Excel 12.0;") ' MyConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" + path + ";Extended Properties=""Excel 10.0;HDR=No;""") 'MyConnection = New System.Data.OleDb.OleDbConnection(("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filepath & ";Extended Properties=""Excel 8.0;HDR=No;IMEX=1"";")) MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]", MyConnection) MyCommand.TableMappings.Add("Table", "Net-informations.com") DtSet = New System.Data.DataSet MyCommand.Fill(DtSet) If (gridValue = 1) Then OrderData_DataGridView2.DataSource = DtSet.Tables(0) Else SystemParams_DataGridView1.DataSource = DtSet.Tables(0) End If MyConnection.Close() Return 1 End Function
visual-studio-2010
excel
datagridview
vb.net-2010
null
null
open
Importing Excel data into DataGridView not possible using Windows 2010 === Hi I have been trying to figure out this problem for the last couple of hours. My goal is to read in the path of an excel file (.xlsx) and then display that data in datagridview. I am using vb.net for visual studio 2010 and I am running Windows7. Ok so here is the problem: I am able to read in .xls files no problem, however if I try to read in the newer .xlsx files I get an exceptions. Below is my code. Note that I have commented out several different ways of reading in data from the excel file. ' gets the ordered data from excel and puts it into datagrid 'inputs: path - the path where the file is located gridValue - a flag to note which grid this data belongs to 1 = order data Private Function FillDataGrid_OrderData(ByVal path, ByVal gridValue) Dim MyConnection As System.Data.OleDb.OleDbConnection Dim DtSet As System.Data.DataSet Dim MyCommand As System.Data.OleDb.OleDbDataAdapter Dim filepath As String = path 'MyConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.14.0;Data Source=" + path + ";Extended Properties=Excel 12.0;") ' MyConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" + path + ";Extended Properties=""Excel 10.0;HDR=No;""") 'MyConnection = New System.Data.OleDb.OleDbConnection(("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filepath & ";Extended Properties=""Excel 8.0;HDR=No;IMEX=1"";")) MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]", MyConnection) MyCommand.TableMappings.Add("Table", "Net-informations.com") DtSet = New System.Data.DataSet MyCommand.Fill(DtSet) If (gridValue = 1) Then OrderData_DataGridView2.DataSource = DtSet.Tables(0) Else SystemParams_DataGridView1.DataSource = DtSet.Tables(0) End If MyConnection.Close() Return 1 End Function
0
6,895,022
08/01/2011 06:50:06
872,313
08/01/2011 06:50:06
1
0
Code for move control
I am working on C#.net.There is a button in the panel on clicking it a picture gets displayed in picturebox,now i want to move this picture in the panel.I tried the move controls but its not working.Please guide me with the code.
c#
null
null
null
null
08/01/2011 22:08:55
not a real question
Code for move control === I am working on C#.net.There is a button in the panel on clicking it a picture gets displayed in picturebox,now i want to move this picture in the panel.I tried the move controls but its not working.Please guide me with the code.
1
8,874,206
01/15/2012 23:12:28
1,150,923
01/15/2012 21:55:01
1
0
How to check and perform SQL statements in Python
I am using the MySQLdb in Python. I was told that to properly create SQL statements and to avoid SQL injection attacks I should code something like: sql = "insert into table VALUES ( %s, %s, %s )" args = var1, var2, var3 cursor.execute( sql, args ) Or: cursor.execute( "insert into table VALUES ( %s, %s, %s )", var1, var2, var3 ) Or even this (this might be wrong): header = ( 'id', 'first_name', 'last_name' ) values = ( '12', 'bob' , 'smith' ) cursor.execute( "insert into table ( %s ) values ( %s )", ( header + values ) ) When I programmed in PHP, I would normally store my entire SQL statement as a long string then execute the string. Something like (with PostgreSQL): $id = db_prep_string( pg_escape_string( $id ) ); $first_name = db_prep_string( pg_escape_string( $first_name ) ); $last_name = db_prep_string( pg_escape_string( $last_name ) ); $query = "insert into table ( id, first_name, last_name ) values ( $id, $first_name, $last_name )" $result = pg_query( $con, $query ); $retval = pg_fetch_array( $result ); where `db_prep_string` is function db_prep_string( $value ) { if( !isset( $value ) || (is_null($value)) || preg_match( '/^\s+$/', $value ) || ( $value == '' ) ) { $value = 'null'; } else { $value = "'$value'"; } return $value; } Then to debug, I could simply echo out `$query` to view the entire SQL statement. Is there something similar I can do with Python? In other words, can I store the **safe** SQL statement as a string, print it to debug, then execute it? If not, then how do I _view_ the SQL statement in its entirety in Python? Bonus question: how do I enter null values in a SQL statement using Python?
python
mysql
sql
null
null
null
open
How to check and perform SQL statements in Python === I am using the MySQLdb in Python. I was told that to properly create SQL statements and to avoid SQL injection attacks I should code something like: sql = "insert into table VALUES ( %s, %s, %s )" args = var1, var2, var3 cursor.execute( sql, args ) Or: cursor.execute( "insert into table VALUES ( %s, %s, %s )", var1, var2, var3 ) Or even this (this might be wrong): header = ( 'id', 'first_name', 'last_name' ) values = ( '12', 'bob' , 'smith' ) cursor.execute( "insert into table ( %s ) values ( %s )", ( header + values ) ) When I programmed in PHP, I would normally store my entire SQL statement as a long string then execute the string. Something like (with PostgreSQL): $id = db_prep_string( pg_escape_string( $id ) ); $first_name = db_prep_string( pg_escape_string( $first_name ) ); $last_name = db_prep_string( pg_escape_string( $last_name ) ); $query = "insert into table ( id, first_name, last_name ) values ( $id, $first_name, $last_name )" $result = pg_query( $con, $query ); $retval = pg_fetch_array( $result ); where `db_prep_string` is function db_prep_string( $value ) { if( !isset( $value ) || (is_null($value)) || preg_match( '/^\s+$/', $value ) || ( $value == '' ) ) { $value = 'null'; } else { $value = "'$value'"; } return $value; } Then to debug, I could simply echo out `$query` to view the entire SQL statement. Is there something similar I can do with Python? In other words, can I store the **safe** SQL statement as a string, print it to debug, then execute it? If not, then how do I _view_ the SQL statement in its entirety in Python? Bonus question: how do I enter null values in a SQL statement using Python?
0
6,912,859
08/02/2011 13:29:29
846,400
07/15/2011 11:57:21
11
0
Power optimization in Linux
I am working on a traffic surveillance project which performs various image processing tasks with a number of visual sensors and a computing platform. My basic task in the project is the power optimization/management. I am using a ZOTAC-IONITX computing platform (Intel ATOM CPU + NVIDIA ION GPU). The problems that I am currently facing are: I am unable to model the power consumption of various components e.g., processor, GPU, hard drive, memory etc, since there seems to be no way to measure the power consumption of individual system components. Since I don't have a power consumption model, I cannot come up with a power optimization algorithm. I am currently working on Linux. I would really appreciate any suggestions in this regard.
linux
null
null
null
null
08/02/2011 14:49:12
not a real question
Power optimization in Linux === I am working on a traffic surveillance project which performs various image processing tasks with a number of visual sensors and a computing platform. My basic task in the project is the power optimization/management. I am using a ZOTAC-IONITX computing platform (Intel ATOM CPU + NVIDIA ION GPU). The problems that I am currently facing are: I am unable to model the power consumption of various components e.g., processor, GPU, hard drive, memory etc, since there seems to be no way to measure the power consumption of individual system components. Since I don't have a power consumption model, I cannot come up with a power optimization algorithm. I am currently working on Linux. I would really appreciate any suggestions in this regard.
1
6,600,721
07/06/2011 17:46:10
832,098
07/06/2011 17:33:45
101
0
How do you define a CSS animation with different timing functions for each property?
I am working with keyframe animations in CSS, and I want to be able to specify different timing functions for each property I'm animating. For instance, during a given keyframe, I'd like to animate opacity from 0 to 1 with an ease-in timing function, and top from 0 to 100 with a linear timing function. This is possible with CSS transitions, by doing something like the below. (Unfortunately I need keyframed animations for other reasons.) -webkit-transition-property: opacity, top; -webkit-timing-function: ease-in, linear; Also, I noticed (at [this link][1]) that the specification for the animation-timing-function property accepts a comma delimited list. However, I don't see any way to specify a corresponding list of properties or any documentation on what the purpose of a list of timing functions is. Does anyone know if what I'm trying to do is possible? [1]: http://www.w3.org/TR/css3-animations/#animation-timing-function_tag
css
firefox
animation
css3
webkit
null
open
How do you define a CSS animation with different timing functions for each property? === I am working with keyframe animations in CSS, and I want to be able to specify different timing functions for each property I'm animating. For instance, during a given keyframe, I'd like to animate opacity from 0 to 1 with an ease-in timing function, and top from 0 to 100 with a linear timing function. This is possible with CSS transitions, by doing something like the below. (Unfortunately I need keyframed animations for other reasons.) -webkit-transition-property: opacity, top; -webkit-timing-function: ease-in, linear; Also, I noticed (at [this link][1]) that the specification for the animation-timing-function property accepts a comma delimited list. However, I don't see any way to specify a corresponding list of properties or any documentation on what the purpose of a list of timing functions is. Does anyone know if what I'm trying to do is possible? [1]: http://www.w3.org/TR/css3-animations/#animation-timing-function_tag
0
4,142,830
11/10/2010 09:15:31
502,974
11/10/2010 09:15:31
1
0
Looking for help
Could someone, who has English(US) Windows try to install and run my program, please? The program uses WPF and requires .NET Framework 4.0, and this framework should be installed automatically during the installation of the program. Unfortunately it looks like something is bad with the setup file or with the program, because nobody from the U.S. run my program up this time (I see how the program asks for an update on my server during each start of the program - there are a lot of requests worldwide but none of them is from the U.S.). I can't try it my self, because I don't have English(US) Windows and on my Windows program runs perfeclty. I know that this is not a typical question about programming, but I don't know where else to find help. Official site of the program is here: http://en-us.1-easysoft.com/SK_ABC/index.html Thanks for any help. Tomas
.net
wpf
null
null
null
11/10/2010 10:57:25
not a real question
Looking for help === Could someone, who has English(US) Windows try to install and run my program, please? The program uses WPF and requires .NET Framework 4.0, and this framework should be installed automatically during the installation of the program. Unfortunately it looks like something is bad with the setup file or with the program, because nobody from the U.S. run my program up this time (I see how the program asks for an update on my server during each start of the program - there are a lot of requests worldwide but none of them is from the U.S.). I can't try it my self, because I don't have English(US) Windows and on my Windows program runs perfeclty. I know that this is not a typical question about programming, but I don't know where else to find help. Official site of the program is here: http://en-us.1-easysoft.com/SK_ABC/index.html Thanks for any help. Tomas
1
6,283,834
06/08/2011 19:03:28
82,156
03/24/2009 18:31:56
5,527
86
SQLException when using Google Analytics with Robolectric
I'm using robolectric to test an activity that makes use of Google Analytics. Unfortunately, whenever I try to start up the activity I get the following exception android.database.SQLException at com.xtremelabs.robolectric.shadows.ShadowSQLiteDatabase.execSQL(ShadowSQLiteDatabase.java:149) at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java) at com.google.android.apps.analytics.PersistentEventStore$DataBaseHelper.onCreate(Unknown Source) at com.xtremelabs.robolectric.shadows.ShadowSQLiteOpenHelper.getWritableDatabase(ShadowSQLiteOpenHelper.java:52) at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java) at com.google.android.apps.analytics.PersistentEventStore.<init>(Unknown Source) at com.google.android.apps.analytics.GoogleAnalyticsTracker.start(Unknown Source) at com.google.android.apps.analytics.GoogleAnalyticsTracker.start(Unknown Source) ... Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE TABLE EVENTS ( 'event_id'[*] BIGINT(19) PRIMARY KEY AUTO_INCREMENT NOT NULL, 'user_id' BIGINT(19) NOT NULL, 'account_id' CHAR(256) NOT NULL, 'random_val' BIGINT(19) NOT NULL, 'timestamp_first' BIGINT(19) NOT NULL, 'timestamp_previous' BIGINT(19) NOT NULL, 'timestamp_current' BIGINT(19) NOT NULL, 'visits' BIGINT(19) NOT NULL, 'category' CHAR(256) NOT NULL, 'action' CHAR(256) NOT NULL, 'label' CHAR(256), 'value' BIGINT(19), 'screen_width' BIGINT(19), 'screen_height' BIGINT(19)); "; expected "identifier"; SQL statement: CREATE TABLE events ( 'event_id' bigint(19) PRIMARY KEY auto_increment NOT NULL, 'user_id' bigint(19) NOT NULL, 'account_id' CHAR(256) NOT NULL, 'random_val' bigint(19) NOT NULL, 'timestamp_first' bigint(19) NOT NULL, 'timestamp_previous' bigint(19) NOT NULL, 'timestamp_current' bigint(19) NOT NULL, 'visits' bigint(19) NOT NULL, 'category' CHAR(256) NOT NULL, 'action' CHAR(256) NOT NULL, 'label' CHAR(256), 'value' bigint(19), 'screen_width' bigint(19), 'screen_height' bigint(19)); [42001-147] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) at org.h2.message.DbException.get(DbException.java:167) at org.h2.message.DbException.getSyntaxError(DbException.java:192) at org.h2.command.Parser.readColumnIdentifier(Parser.java:2694) at org.h2.command.Parser.parseCreateTable(Parser.java:4975) at org.h2.command.Parser.parseCreate(Parser.java:3705) at org.h2.command.Parser.parsePrepared(Parser.java:320) at org.h2.command.Parser.parse(Parser.java:275) at org.h2.command.Parser.parse(Parser.java:247) at org.h2.command.Parser.prepare(Parser.java:201) at org.h2.command.Parser.prepareCommand(Parser.java:214) at org.h2.engine.Session.prepareLocal(Session.java:425) at org.h2.engine.Session.prepareCommand(Session.java:374) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1056) at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:165) at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:153) at com.xtremelabs.robolectric.shadows.ShadowSQLiteDatabase.execSQL(ShadowSQLiteDatabase.java:147) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.xtremelabs.robolectric.bytecode.ShadowWrangler.methodInvoked(ShadowWrangler.java:87) at com.xtremelabs.robolectric.bytecode.RobolectricInternals.methodInvoked(RobolectricInternals.java:110) at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java) at com.google.android.apps.analytics.PersistentEventStore$DataBaseHelper.onCreate(Unknown Source) at com.xtremelabs.robolectric.shadows.ShadowSQLiteOpenHelper.getWritableDatabase(ShadowSQLiteOpenHelper.java:52) The problem is that Android uses SQLite databases, but robolectric is using H2 which support a slightly different flavor of SQL. What's the easiest way to get around this problem?
android
google-analytics
robolectric
null
null
null
open
SQLException when using Google Analytics with Robolectric === I'm using robolectric to test an activity that makes use of Google Analytics. Unfortunately, whenever I try to start up the activity I get the following exception android.database.SQLException at com.xtremelabs.robolectric.shadows.ShadowSQLiteDatabase.execSQL(ShadowSQLiteDatabase.java:149) at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java) at com.google.android.apps.analytics.PersistentEventStore$DataBaseHelper.onCreate(Unknown Source) at com.xtremelabs.robolectric.shadows.ShadowSQLiteOpenHelper.getWritableDatabase(ShadowSQLiteOpenHelper.java:52) at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java) at com.google.android.apps.analytics.PersistentEventStore.<init>(Unknown Source) at com.google.android.apps.analytics.GoogleAnalyticsTracker.start(Unknown Source) at com.google.android.apps.analytics.GoogleAnalyticsTracker.start(Unknown Source) ... Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE TABLE EVENTS ( 'event_id'[*] BIGINT(19) PRIMARY KEY AUTO_INCREMENT NOT NULL, 'user_id' BIGINT(19) NOT NULL, 'account_id' CHAR(256) NOT NULL, 'random_val' BIGINT(19) NOT NULL, 'timestamp_first' BIGINT(19) NOT NULL, 'timestamp_previous' BIGINT(19) NOT NULL, 'timestamp_current' BIGINT(19) NOT NULL, 'visits' BIGINT(19) NOT NULL, 'category' CHAR(256) NOT NULL, 'action' CHAR(256) NOT NULL, 'label' CHAR(256), 'value' BIGINT(19), 'screen_width' BIGINT(19), 'screen_height' BIGINT(19)); "; expected "identifier"; SQL statement: CREATE TABLE events ( 'event_id' bigint(19) PRIMARY KEY auto_increment NOT NULL, 'user_id' bigint(19) NOT NULL, 'account_id' CHAR(256) NOT NULL, 'random_val' bigint(19) NOT NULL, 'timestamp_first' bigint(19) NOT NULL, 'timestamp_previous' bigint(19) NOT NULL, 'timestamp_current' bigint(19) NOT NULL, 'visits' bigint(19) NOT NULL, 'category' CHAR(256) NOT NULL, 'action' CHAR(256) NOT NULL, 'label' CHAR(256), 'value' bigint(19), 'screen_width' bigint(19), 'screen_height' bigint(19)); [42001-147] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) at org.h2.message.DbException.get(DbException.java:167) at org.h2.message.DbException.getSyntaxError(DbException.java:192) at org.h2.command.Parser.readColumnIdentifier(Parser.java:2694) at org.h2.command.Parser.parseCreateTable(Parser.java:4975) at org.h2.command.Parser.parseCreate(Parser.java:3705) at org.h2.command.Parser.parsePrepared(Parser.java:320) at org.h2.command.Parser.parse(Parser.java:275) at org.h2.command.Parser.parse(Parser.java:247) at org.h2.command.Parser.prepare(Parser.java:201) at org.h2.command.Parser.prepareCommand(Parser.java:214) at org.h2.engine.Session.prepareLocal(Session.java:425) at org.h2.engine.Session.prepareCommand(Session.java:374) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1056) at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:165) at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:153) at com.xtremelabs.robolectric.shadows.ShadowSQLiteDatabase.execSQL(ShadowSQLiteDatabase.java:147) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.xtremelabs.robolectric.bytecode.ShadowWrangler.methodInvoked(ShadowWrangler.java:87) at com.xtremelabs.robolectric.bytecode.RobolectricInternals.methodInvoked(RobolectricInternals.java:110) at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java) at com.google.android.apps.analytics.PersistentEventStore$DataBaseHelper.onCreate(Unknown Source) at com.xtremelabs.robolectric.shadows.ShadowSQLiteOpenHelper.getWritableDatabase(ShadowSQLiteOpenHelper.java:52) The problem is that Android uses SQLite databases, but robolectric is using H2 which support a slightly different flavor of SQL. What's the easiest way to get around this problem?
0
11,651,471
07/25/2012 14:00:19
165,589
08/30/2009 12:36:29
1,402
15
How to optimize this loop algorithm?
Need to print out: 0 -1 1 -2 2 -3 3 -4 4 ... Write the code below for this case: for(int i=0;i<=4;i++){ for(int k=-i;;k=Math.abs(i)){ System.out.println(k); if(i==k)break; } } Is there any way to optimize this algorithm?
algorithm
null
null
null
null
07/25/2012 18:23:09
off topic
How to optimize this loop algorithm? === Need to print out: 0 -1 1 -2 2 -3 3 -4 4 ... Write the code below for this case: for(int i=0;i<=4;i++){ for(int k=-i;;k=Math.abs(i)){ System.out.println(k); if(i==k)break; } } Is there any way to optimize this algorithm?
2
10,454,933
05/04/2012 19:23:58
1,333,679
04/14/2012 19:34:27
8
0
Output PHP to Textbox
I'm trying to get the result of a multiplication done in php to show up in a form's textbox. How to do it in php?
php
textbox
null
null
null
05/06/2012 06:07:25
not a real question
Output PHP to Textbox === I'm trying to get the result of a multiplication done in php to show up in a form's textbox. How to do it in php?
1
11,250,230
06/28/2012 17:51:07
1,489,379
06/28/2012 17:45:37
1
0
unterminated string literal error in php(wordpress)
var to_appned = "<div class="slider_page_info"><div class="val">1<\/div><div class="arrow"><\/div><\/div>"; jQuery('.wpp_pagination_slider .ui-slider-handle', this).append(to_appned); This is my code which is giving me "unterminated string literal" error due to which some other lines of code is not working. Give me solution with example please.
php
jquery
string
wordpress
literals
06/29/2012 18:52:03
too localized
unterminated string literal error in php(wordpress) === var to_appned = "<div class="slider_page_info"><div class="val">1<\/div><div class="arrow"><\/div><\/div>"; jQuery('.wpp_pagination_slider .ui-slider-handle', this).append(to_appned); This is my code which is giving me "unterminated string literal" error due to which some other lines of code is not working. Give me solution with example please.
3
10,597,086
05/15/2012 08:43:15
1,388,725
05/11/2012 06:13:00
1
0
Sharepoint chart webpart
I am trying to add a chart webpart user control from the sharepoint webparts. I am able to see the chart webpart but when i try to add it an alert is displayed with a message "**Cannot Import chart webpart**". Please help me. Thanks in advance.
sharepoint
sharepoint2010
sharepoint-api
null
null
05/16/2012 19:51:38
off topic
Sharepoint chart webpart === I am trying to add a chart webpart user control from the sharepoint webparts. I am able to see the chart webpart but when i try to add it an alert is displayed with a message "**Cannot Import chart webpart**". Please help me. Thanks in advance.
2