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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8,794,367 | 01/09/2012 19:58:18 | 102,312 | 05/06/2009 15:42:40 | 25 | 1 | issue with webservice and ssl | I have a website with a webservice published to it. If i hit the webservice with a webpage using http, so i pass something like this http://denny.dog.com/Test.svc, i get a web page back that looks correct and has to test it, that i can use svcutil.exe http://denny.dog.com/Test.svc.
Now, when i change it to an ssl(and the ssl is working as far as i can hit other web pages using https), so i pass in https://denny.dog.com/Test.svc i get a web page back but this time it says svcutil.exe http://ser04/Test.svc.
So the https call comes back as http, it comes back as the name of the server. What have i not configured so that it would come back correctly?.
so you have hopefully the info you need.. here is the webservice
Imports System.ServiceModel
Imports System.ServiceModel.Activation
Imports System.Collections.Generic
<ServiceContract(Namespace:="https://denny.dog.com")>
<SilverLightFaultBehavior()>
<AspNetCompatibilityRequirements(RequirementsMode:=AspNetCompatibilityRequirementsMode.Allowed)>
Public Class Test
<OperationContract()>
Public Function DoWork(oTypingTestResults As List(Of Dempsey.TypingTestData_Queries)) As String
' Add your operation implementation here
Dim mProc As New Dempsey.TypingTestData_Queries
mProc._StoreIndividualTestResults(oTypingTestResults)
If mProc.mErrMsg Is Nothing Then
Return oTypingTestResults.Count.ToString
Else
Return mProc.mErrMsg
End If
End Function
' Add more operations here and mark them with <OperationContract()>
End Class
and the web.config
<bindings>
<customBinding>
<binding name="TypingTest.customBinding0">
<binaryMessageEncoding />
<httpTransport />
</binding>
</customBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
<services>
<service name="TypingTest">
<endpoint address="~/Test.svc" binding="customBinding" bindingConfiguration="TypingTest.customBinding0"
contract="Test" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
I'd sure love to find out what i'm missing.
thanks
shannon | web-services | ssl | null | null | null | null | open | issue with webservice and ssl
===
I have a website with a webservice published to it. If i hit the webservice with a webpage using http, so i pass something like this http://denny.dog.com/Test.svc, i get a web page back that looks correct and has to test it, that i can use svcutil.exe http://denny.dog.com/Test.svc.
Now, when i change it to an ssl(and the ssl is working as far as i can hit other web pages using https), so i pass in https://denny.dog.com/Test.svc i get a web page back but this time it says svcutil.exe http://ser04/Test.svc.
So the https call comes back as http, it comes back as the name of the server. What have i not configured so that it would come back correctly?.
so you have hopefully the info you need.. here is the webservice
Imports System.ServiceModel
Imports System.ServiceModel.Activation
Imports System.Collections.Generic
<ServiceContract(Namespace:="https://denny.dog.com")>
<SilverLightFaultBehavior()>
<AspNetCompatibilityRequirements(RequirementsMode:=AspNetCompatibilityRequirementsMode.Allowed)>
Public Class Test
<OperationContract()>
Public Function DoWork(oTypingTestResults As List(Of Dempsey.TypingTestData_Queries)) As String
' Add your operation implementation here
Dim mProc As New Dempsey.TypingTestData_Queries
mProc._StoreIndividualTestResults(oTypingTestResults)
If mProc.mErrMsg Is Nothing Then
Return oTypingTestResults.Count.ToString
Else
Return mProc.mErrMsg
End If
End Function
' Add more operations here and mark them with <OperationContract()>
End Class
and the web.config
<bindings>
<customBinding>
<binding name="TypingTest.customBinding0">
<binaryMessageEncoding />
<httpTransport />
</binding>
</customBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
<services>
<service name="TypingTest">
<endpoint address="~/Test.svc" binding="customBinding" bindingConfiguration="TypingTest.customBinding0"
contract="Test" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
I'd sure love to find out what i'm missing.
thanks
shannon | 0 |
8,325,935 | 11/30/2011 12:27:17 | 932,546 | 09/07/2011 11:02:44 | 37 | 0 | Filtering based on Dimensions | There are 4 dimension rule sets defined on A ledger account
I go to General ledger --> Periodic --> Fiscal year close -->Opening transactions
Here i specify the end date and the ledger account for which the dimensions rules are set.
when i click ok , it creates the Opening transactions for the next fiscal year.
here it created the opening transactions irrespective of the dimension rule set, but i need it to filter based on the Dimension rules set on the ledger account .
Can anyone please tell me how to filter the transactions based on Dimensions set.
Am using AX 2009
Regards,
Tj | axapta | x++ | null | null | null | 12/02/2011 14:52:30 | off topic | Filtering based on Dimensions
===
There are 4 dimension rule sets defined on A ledger account
I go to General ledger --> Periodic --> Fiscal year close -->Opening transactions
Here i specify the end date and the ledger account for which the dimensions rules are set.
when i click ok , it creates the Opening transactions for the next fiscal year.
here it created the opening transactions irrespective of the dimension rule set, but i need it to filter based on the Dimension rules set on the ledger account .
Can anyone please tell me how to filter the transactions based on Dimensions set.
Am using AX 2009
Regards,
Tj | 2 |
10,164,552 | 04/15/2012 17:54:41 | 439,232 | 09/03/2010 18:33:18 | 361 | 3 | SQL Statement Giving me an error? | My code below (must be something to do with sql statement (the UPDATE query statement), basically when i go in browser and visit script with a key that i know exists in the database i get the following error:
[15/04/2012 18:33:57] - exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'user_activation_key'' in C:\wamp\www\user-verify.php:53
Stack trace:
#0 C:\wamp\www\user-verify.php(53): PDOStatement->execute(Array)
#1 {main}
Here is my code:, not sure what it saying about duplicate entry, as the user_activation_key column is unique and yes i am using InnoDB and foreign keys for data interigty.
// check if key is set and alphanumeric and equals 40 chars long
// we use sha1 so it will always be 40 chars long.
if(isset($_GET['key']) && ctype_alnum($_GET['key']) && strlen($_GET['key']) == 40){
$key = trim($_GET['key']);
}
// if key isset
if(isset($key)){
try {
// connect to database
$dbh = sql_con();
// if key is of valid length and type we need to update the `user_activation_key` in the `users_status` table to NULL
// and update the `user_status`in the `users` table to 1 (tinyint)(active) based on the condition that the
// activation key can be found in the users_status.user_activation_key column and user_uid match in both users_status and users table
$stmt = $dbh->prepare("
UPDATE
users
JOIN
users_status
ON
users_status.user_activation_key = ?
SET
users.user_status = 1,
users_status.user_activation_key = NULL
WHERE
users_status.user_uid = users.user_uid");
// execute query
$stmt->execute(array($key));
if ( $stmt->rowCount() > 0 ) {
echo 'account now activated';
exit;
} else {
echo 'could not activate account at this time';
exit;
}
// close database connection
$dbh = null;
} // if any errors found log them and display friendly message
catch (PDOException $e) {
ExceptionErrorHandler($e);
require_once($footer_inc);
exit;
}
} else {
// else key not valid or set
echo '<h1>Invalid Activation Link</h1>';
$SiteErrorMessages =
"Oops! Your account could not be activated. Please recheck the link in your email.
The activation link appears to be invalid.<br /><br />
If the problem persists please request a new one <a href='/member/resend-activation-email'>here</a>.";
SiteErrorMessages();
include($footer_inc);
exit;
}
Not sure why i am getting that error, any know what it means exactly ?
It won't perform the update even thou the key exists in the `users_status` table. if i enter an invalid key it says **could not activate account at this time** which is what it should do but when the key is valid it should update but it's outputting the error above.
Thanks,
phplover | php | mysql | sql | pdo | mysqli | null | open | SQL Statement Giving me an error?
===
My code below (must be something to do with sql statement (the UPDATE query statement), basically when i go in browser and visit script with a key that i know exists in the database i get the following error:
[15/04/2012 18:33:57] - exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'user_activation_key'' in C:\wamp\www\user-verify.php:53
Stack trace:
#0 C:\wamp\www\user-verify.php(53): PDOStatement->execute(Array)
#1 {main}
Here is my code:, not sure what it saying about duplicate entry, as the user_activation_key column is unique and yes i am using InnoDB and foreign keys for data interigty.
// check if key is set and alphanumeric and equals 40 chars long
// we use sha1 so it will always be 40 chars long.
if(isset($_GET['key']) && ctype_alnum($_GET['key']) && strlen($_GET['key']) == 40){
$key = trim($_GET['key']);
}
// if key isset
if(isset($key)){
try {
// connect to database
$dbh = sql_con();
// if key is of valid length and type we need to update the `user_activation_key` in the `users_status` table to NULL
// and update the `user_status`in the `users` table to 1 (tinyint)(active) based on the condition that the
// activation key can be found in the users_status.user_activation_key column and user_uid match in both users_status and users table
$stmt = $dbh->prepare("
UPDATE
users
JOIN
users_status
ON
users_status.user_activation_key = ?
SET
users.user_status = 1,
users_status.user_activation_key = NULL
WHERE
users_status.user_uid = users.user_uid");
// execute query
$stmt->execute(array($key));
if ( $stmt->rowCount() > 0 ) {
echo 'account now activated';
exit;
} else {
echo 'could not activate account at this time';
exit;
}
// close database connection
$dbh = null;
} // if any errors found log them and display friendly message
catch (PDOException $e) {
ExceptionErrorHandler($e);
require_once($footer_inc);
exit;
}
} else {
// else key not valid or set
echo '<h1>Invalid Activation Link</h1>';
$SiteErrorMessages =
"Oops! Your account could not be activated. Please recheck the link in your email.
The activation link appears to be invalid.<br /><br />
If the problem persists please request a new one <a href='/member/resend-activation-email'>here</a>.";
SiteErrorMessages();
include($footer_inc);
exit;
}
Not sure why i am getting that error, any know what it means exactly ?
It won't perform the update even thou the key exists in the `users_status` table. if i enter an invalid key it says **could not activate account at this time** which is what it should do but when the key is valid it should update but it's outputting the error above.
Thanks,
phplover | 0 |
9,413,909 | 02/23/2012 13:21:41 | 218,725 | 11/25/2009 15:42:47 | 255 | 3 | Codeigniter routes with question mark & regular expressions | Can anyone suggest a regular expression for this route in codeigniter
?config=/flash/flash_output/133/location.htm
I'd need a route to reroute to a controller/function called redirect/all
Any ideas of the reg expression needed to 'catch' the URL above | php | regex | codeigniter | routes | null | 02/23/2012 21:49:28 | not a real question | Codeigniter routes with question mark & regular expressions
===
Can anyone suggest a regular expression for this route in codeigniter
?config=/flash/flash_output/133/location.htm
I'd need a route to reroute to a controller/function called redirect/all
Any ideas of the reg expression needed to 'catch' the URL above | 1 |
6,625,920 | 07/08/2011 14:28:11 | 428,741 | 01/15/2010 18:51:33 | 228 | 1 | Ignore a directory in SVN | We use SVN for a giant server of design assets at my job. I like to keep the root of our server checked out, so I can get organizational updates to the directory hierarchy as they're made. But their are certain directories within that I won't ever be touching... and they're huge... 15 gb+.
I want to rm these directories, and have them not pull back down when I svn up from the root. Is this possible? | svn | version-control | ignore | null | null | null | open | Ignore a directory in SVN
===
We use SVN for a giant server of design assets at my job. I like to keep the root of our server checked out, so I can get organizational updates to the directory hierarchy as they're made. But their are certain directories within that I won't ever be touching... and they're huge... 15 gb+.
I want to rm these directories, and have them not pull back down when I svn up from the root. Is this possible? | 0 |
11,583,056 | 07/20/2012 16:06:33 | 293,249 | 03/14/2010 04:12:52 | 512 | 4 | C# XML How to retrive innerText of field by attribute? | Here is the XML sample:
<?xml version="1.0" ?>
<XMLScreen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CX>80</CX>
<CY>24</CY>
<Formatted>true</Formatted>
<Field>
<Location position="1" left="1" top="0" length="69" />
<Attributes Base="226" Protected="false" FieldType="High" />
*SDC SCHEDULING CATEGORY UPDATE
</Field>
</XMLScreen>
I want to retrive the Inner text of each field based on its `Location position`.
What I have so far is:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(myEm.CurrentScreenXML.GetXMLText());
XmlNodeList fields = xmlDoc.GetElementsByTagName("Field");
MessageBox.Show("Field spot: " + i + " Contains: " + fields[i].InnerText);
And I want to be able to just extract the inner text of the field by passing in a number of the location position. So if I say `foo[i]` I want to be able to get the innertext
> *SDC SCHEDULING CATEGORY UPDATE | c# | xml | xml-parsing | null | null | null | open | C# XML How to retrive innerText of field by attribute?
===
Here is the XML sample:
<?xml version="1.0" ?>
<XMLScreen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CX>80</CX>
<CY>24</CY>
<Formatted>true</Formatted>
<Field>
<Location position="1" left="1" top="0" length="69" />
<Attributes Base="226" Protected="false" FieldType="High" />
*SDC SCHEDULING CATEGORY UPDATE
</Field>
</XMLScreen>
I want to retrive the Inner text of each field based on its `Location position`.
What I have so far is:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(myEm.CurrentScreenXML.GetXMLText());
XmlNodeList fields = xmlDoc.GetElementsByTagName("Field");
MessageBox.Show("Field spot: " + i + " Contains: " + fields[i].InnerText);
And I want to be able to just extract the inner text of the field by passing in a number of the location position. So if I say `foo[i]` I want to be able to get the innertext
> *SDC SCHEDULING CATEGORY UPDATE | 0 |
2,154,212 | 01/28/2010 11:50:24 | 51,604 | 01/05/2009 11:26:55 | 281 | 15 | Android First App, changing the background color from a list of specified colors | This is my first app so finding my way around bit by bit and have been experimenting a little and would like to change the background colour to a colour from a list.
Currently it loads a white background specified in strings.xml
<color name="all_white">#FFFFFF</color>
This is used in main.xml:
android:background="@color/all_white"
Ideally I would like to change the colour in OnCreate() to a colour of my choice. I have tried setBackgroundDrawable but it doesnt seem to work?
This is my code:
public class TestActivity extends Activity
{
double dimValPercent = 100;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
SetDimLevel(dimValPercent);
SetBackground();
return;
}
public void SetBackground()
{
getWindow().setBackgroundDrawable( new ColorDrawable
(color.all_blue) );
return;
}
void SetDimLevel(double dimVal)
{
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = (float) (dimVal/ 255.0);
getWindow().setAttributes(lp);
return;
}
} | android | null | null | null | null | null | open | Android First App, changing the background color from a list of specified colors
===
This is my first app so finding my way around bit by bit and have been experimenting a little and would like to change the background colour to a colour from a list.
Currently it loads a white background specified in strings.xml
<color name="all_white">#FFFFFF</color>
This is used in main.xml:
android:background="@color/all_white"
Ideally I would like to change the colour in OnCreate() to a colour of my choice. I have tried setBackgroundDrawable but it doesnt seem to work?
This is my code:
public class TestActivity extends Activity
{
double dimValPercent = 100;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
SetDimLevel(dimValPercent);
SetBackground();
return;
}
public void SetBackground()
{
getWindow().setBackgroundDrawable( new ColorDrawable
(color.all_blue) );
return;
}
void SetDimLevel(double dimVal)
{
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = (float) (dimVal/ 255.0);
getWindow().setAttributes(lp);
return;
}
} | 0 |
7,733,611 | 10/11/2011 23:14:00 | 980,314 | 10/05/2011 12:10:41 | 1 | 0 | output text from mysql with php- how to provide user the ability to style his text? | in mysql i have a text column, and the input that is passed in (from a form with a textarea) is filtered with mysql_real_escape_string and htmlentities (in php). I want to output this text and keep the new lines that user enters. Also i would like to provide to the user some nice buttons in the text area (in html form) so that he can enter text in bold etc.
(I tried to output with html_entity_decode but also javascript could be passed in)
Any ideas? | php | text | coding-style | output | null | 10/12/2011 01:55:07 | not a real question | output text from mysql with php- how to provide user the ability to style his text?
===
in mysql i have a text column, and the input that is passed in (from a form with a textarea) is filtered with mysql_real_escape_string and htmlentities (in php). I want to output this text and keep the new lines that user enters. Also i would like to provide to the user some nice buttons in the text area (in html form) so that he can enter text in bold etc.
(I tried to output with html_entity_decode but also javascript could be passed in)
Any ideas? | 1 |
2,951,633 | 06/01/2010 16:46:04 | 355,617 | 06/01/2010 16:14:01 | 1 | 0 | How can I create a locationID type of column to denote what server created a row in SQL Server Merge Replication? | I want to setup merge replication between two SQL Server 2008 Servers. For the Primary Key’s, I’d like to use a composite key: an identity column plus a column that will denote which server the row was created on (locationID column).
Any ideas on how to do this? I’m not sure if you could use a trigger or a function to insert a default value every time a row is entered, but I’ve read this method is possible – just can’t find detailed steps on how to exactly do it.
Thanks for any help or references you can provide!
| sql-server | replication | null | null | null | null | open | How can I create a locationID type of column to denote what server created a row in SQL Server Merge Replication?
===
I want to setup merge replication between two SQL Server 2008 Servers. For the Primary Key’s, I’d like to use a composite key: an identity column plus a column that will denote which server the row was created on (locationID column).
Any ideas on how to do this? I’m not sure if you could use a trigger or a function to insert a default value every time a row is entered, but I’ve read this method is possible – just can’t find detailed steps on how to exactly do it.
Thanks for any help or references you can provide!
| 0 |
1,673,626 | 11/04/2009 13:00:31 | 7,918 | 09/15/2008 14:41:36 | 695 | 39 | JAXB appending unneded namespace declarations to tags | I'm implementing a homebrew subprotocol of XMPP, and i'm using combination of StAX and JAXB for parsing/marshalling mesages. And when I marshall a message I end up with loads of unneded namespace declarations:
<ns2:auth xmlns:ns2="urn:ietf:params:xml:ns:ilf-auth"
xmlns:ns4="ilf:iq:experiment:power" xmlns:ns3="ilf:iq:experiment:init"
xmlns:ns5="ilf:iq:experiment:values" xmlns:ns6="ilf:iq:experiment:result"
xmlns:ns7="ilf:iq:experiment:stop" xmlns:ns8="ilf:iq:experiment:end">
compton@ilf</ns2:auth>
instead of:
<ns:auth xmlns:ns="urn:ietf:params:xml:ns:ilf-auth>compton@ilf</ns2:auth>
Is there any way to turn that of?
All these namespaces are used in different messages that get marshalled/unmarshalled by JAXB, but every message uses one namespace.
PS. I am not an XML expert please dont rant me if I did some stupid mistake ;) | java | jaxb | xml | jaxb2 | xml-namespaces | null | open | JAXB appending unneded namespace declarations to tags
===
I'm implementing a homebrew subprotocol of XMPP, and i'm using combination of StAX and JAXB for parsing/marshalling mesages. And when I marshall a message I end up with loads of unneded namespace declarations:
<ns2:auth xmlns:ns2="urn:ietf:params:xml:ns:ilf-auth"
xmlns:ns4="ilf:iq:experiment:power" xmlns:ns3="ilf:iq:experiment:init"
xmlns:ns5="ilf:iq:experiment:values" xmlns:ns6="ilf:iq:experiment:result"
xmlns:ns7="ilf:iq:experiment:stop" xmlns:ns8="ilf:iq:experiment:end">
compton@ilf</ns2:auth>
instead of:
<ns:auth xmlns:ns="urn:ietf:params:xml:ns:ilf-auth>compton@ilf</ns2:auth>
Is there any way to turn that of?
All these namespaces are used in different messages that get marshalled/unmarshalled by JAXB, but every message uses one namespace.
PS. I am not an XML expert please dont rant me if I did some stupid mistake ;) | 0 |
6,278,844 | 06/08/2011 12:42:13 | 789,183 | 06/08/2011 12:42:13 | 1 | 0 | Output random hex from an executable | I am currently looking at how to output an executable as hex, although instead of outputting it all as hex, I would just like a random selection of hex's output for example 16 hex's.
E.g.
hex.exe > input.exe < randomhex.txt | java | c++ | c | perl | hex | 06/08/2011 12:45:16 | not a real question | Output random hex from an executable
===
I am currently looking at how to output an executable as hex, although instead of outputting it all as hex, I would just like a random selection of hex's output for example 16 hex's.
E.g.
hex.exe > input.exe < randomhex.txt | 1 |
5,569,577 | 04/06/2011 16:08:03 | 517,764 | 11/23/2010 17:15:37 | 73 | 0 | C#.NET NSF server implementation? | I maintain the management UI for an embedded device running a proprietary RTOS, which communicates with the manager over a simple socket. We have recently added a NFS client to said device, which runs NFS v2 or v3, so that it can access files over the network. I'm looking for a way to dynamically serve up a folder on the machine running the management app, to the device, from our management application, which is written in C# .NET 3.5.
So what I'm faced with is needing NFS server objects of some kind that I can instantiate, configure, and launch in code, then pass the info for the NFS share over to my device, which will then mount the share. Once the device is done, it will disconnect and tell me it's done, at which point I can shut down and dispose of the server object.
I've dug around a bit and found a few Java NFS servers, but nothing for C#. I found an excellent NFS client here (http://code.google.com/p/nekodrive/), but it seems to offer no serving functionality. Is there anything out there that does what I'm looking for, or am I going to have to write my own server from scratch? | c# | .net | nfs | null | null | null | open | C#.NET NSF server implementation?
===
I maintain the management UI for an embedded device running a proprietary RTOS, which communicates with the manager over a simple socket. We have recently added a NFS client to said device, which runs NFS v2 or v3, so that it can access files over the network. I'm looking for a way to dynamically serve up a folder on the machine running the management app, to the device, from our management application, which is written in C# .NET 3.5.
So what I'm faced with is needing NFS server objects of some kind that I can instantiate, configure, and launch in code, then pass the info for the NFS share over to my device, which will then mount the share. Once the device is done, it will disconnect and tell me it's done, at which point I can shut down and dispose of the server object.
I've dug around a bit and found a few Java NFS servers, but nothing for C#. I found an excellent NFS client here (http://code.google.com/p/nekodrive/), but it seems to offer no serving functionality. Is there anything out there that does what I'm looking for, or am I going to have to write my own server from scratch? | 0 |
9,290,972 | 02/15/2012 09:41:03 | 17,279 | 09/18/2008 05:53:12 | 25,708 | 807 | Is it possible to make AVURLAsset work without a file extension? | I’m trying to create thumbnails for video files:
- (UIImage*) thumbnailForVideoAtURL: (NSURL*) videoURL
{
AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:videoURL options:nil];
AVAssetImageGenerator *generator = [[AVAssetImageGenerator alloc] initWithAsset:asset];
CGImageRef imageHandle = [generator copyCGImageAtTime:kCMTimeZero actualTime:NULL error:NULL];
if (imageHandle) {
UIImage *frameImage = [UIImage imageWithCGImage:imageHandle];
CFRelease(imageHandle);
return frameImage;
} else {
return nil;
}
}
The catch is that the video files are stored in a [content-addressable store][1] and have no extensions. This appears to throw `AVURLAsset` off, as the asset gets created, but upon reading the frame image I get the following error:
Error Domain=AVFoundationErrorDomain Code=-11828 "Cannot Open" UserInfo=0x167170 {NSLocalizedFailureReason=This media format is not supported., NSUnderlyingError=0x163a00 "The operation couldn’t be completed. (OSStatus error -12847.)", NSLocalizedDescription=Cannot Open}
Is this documented or mentioned somewhere? I can’t believe I’m really forced to pass the file format information through the file name. The `options` argument to the `AVURLAsset` initializer looks like a good place to supply the filetype, but according to the documentation there does not seem to be any support for that.
PS. I have tested the code, the same file with the correct extension produces the thumbnails just fine.
[1]: http://en.wikipedia.org/wiki/Content-addressable_storage
| avfoundation | avurlasset | null | null | null | null | open | Is it possible to make AVURLAsset work without a file extension?
===
I’m trying to create thumbnails for video files:
- (UIImage*) thumbnailForVideoAtURL: (NSURL*) videoURL
{
AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:videoURL options:nil];
AVAssetImageGenerator *generator = [[AVAssetImageGenerator alloc] initWithAsset:asset];
CGImageRef imageHandle = [generator copyCGImageAtTime:kCMTimeZero actualTime:NULL error:NULL];
if (imageHandle) {
UIImage *frameImage = [UIImage imageWithCGImage:imageHandle];
CFRelease(imageHandle);
return frameImage;
} else {
return nil;
}
}
The catch is that the video files are stored in a [content-addressable store][1] and have no extensions. This appears to throw `AVURLAsset` off, as the asset gets created, but upon reading the frame image I get the following error:
Error Domain=AVFoundationErrorDomain Code=-11828 "Cannot Open" UserInfo=0x167170 {NSLocalizedFailureReason=This media format is not supported., NSUnderlyingError=0x163a00 "The operation couldn’t be completed. (OSStatus error -12847.)", NSLocalizedDescription=Cannot Open}
Is this documented or mentioned somewhere? I can’t believe I’m really forced to pass the file format information through the file name. The `options` argument to the `AVURLAsset` initializer looks like a good place to supply the filetype, but according to the documentation there does not seem to be any support for that.
PS. I have tested the code, the same file with the correct extension produces the thumbnails just fine.
[1]: http://en.wikipedia.org/wiki/Content-addressable_storage
| 0 |
1,553,792 | 10/12/2009 10:22:21 | 163,358 | 08/26/2009 09:10:45 | 1 | 0 | The best PHP IDE , for pentium 3 , CPU 667 MHz , DDR 256 mb | What is the best , PHP IDE , for pentium 3 , CPU 667 MHz , DDR 256 mb , that can run very fast , and have a php debuger , and easy to work :).
Thx ! | php | ide | null | null | null | 09/03/2011 21:36:54 | not constructive | The best PHP IDE , for pentium 3 , CPU 667 MHz , DDR 256 mb
===
What is the best , PHP IDE , for pentium 3 , CPU 667 MHz , DDR 256 mb , that can run very fast , and have a php debuger , and easy to work :).
Thx ! | 4 |
9,077,859 | 01/31/2012 10:21:06 | 390,423 | 07/13/2010 12:08:15 | 447 | 26 | Can we play prerecorded message in a call through iPhone app? | I want to create an app with following features:
1. User should be able to make a call to number.
2. App will play the prerecorded message when call get connected.
3. After playing the message, line will be connected.
I heard that Apple doesn't allow the developers to interact with the calling functionality of iPhone but is there any way to achieve this. Please suggest!
Thanks- | iphone | null | null | null | null | null | open | Can we play prerecorded message in a call through iPhone app?
===
I want to create an app with following features:
1. User should be able to make a call to number.
2. App will play the prerecorded message when call get connected.
3. After playing the message, line will be connected.
I heard that Apple doesn't allow the developers to interact with the calling functionality of iPhone but is there any way to achieve this. Please suggest!
Thanks- | 0 |
10,310,759 | 04/25/2012 06:55:50 | 842,616 | 07/13/2011 11:52:25 | 209 | 4 | JQuery Validation Plugin Doesn't Work With Simple Button | I am using JQuery validation plugin to validate forms in my application. It works well when the button is of type 'submit'. However, I have one form in which I need the data to be submitted using JQuery.Ajax, hence I am using simple `<input type='button'>`. But then the validation wont work.
Here's the working code-
<head>
<script>
$(document).ready(function(){
$("#some_form").validate({});
});
</script>
</head>
<body>
<form name='some_form' id='some_form'>
<!-- Form Fields -->
<input type='submit' value='Submit'>
</form>
</body>
The above code works, however, when I put this in the code `<input type='button' value='Submit'>`, it doesn't work.
Does anybody has any idea how to get this working? | javascript | jquery | jquery-ajax | jquery-validate | jquery-validation-plugin | 04/25/2012 13:17:10 | not a real question | JQuery Validation Plugin Doesn't Work With Simple Button
===
I am using JQuery validation plugin to validate forms in my application. It works well when the button is of type 'submit'. However, I have one form in which I need the data to be submitted using JQuery.Ajax, hence I am using simple `<input type='button'>`. But then the validation wont work.
Here's the working code-
<head>
<script>
$(document).ready(function(){
$("#some_form").validate({});
});
</script>
</head>
<body>
<form name='some_form' id='some_form'>
<!-- Form Fields -->
<input type='submit' value='Submit'>
</form>
</body>
The above code works, however, when I put this in the code `<input type='button' value='Submit'>`, it doesn't work.
Does anybody has any idea how to get this working? | 1 |
8,474,882 | 12/12/2011 13:13:17 | 311,130 | 04/07/2010 15:18:03 | 944 | 18 | ambiguous extention method | > c#:
database.ExecuteScalar(command).NoNull<string>(string.Empty);
I get an error the the extension method is ambiguous .
I have two dlls with the same code that implement NoNull(string str) under different namespace.
How can **explicit** refer to one dll ?
How would I have it done if it was the same namespace?
TIA
| c# | .net | null | null | null | null | open | ambiguous extention method
===
> c#:
database.ExecuteScalar(command).NoNull<string>(string.Empty);
I get an error the the extension method is ambiguous .
I have two dlls with the same code that implement NoNull(string str) under different namespace.
How can **explicit** refer to one dll ?
How would I have it done if it was the same namespace?
TIA
| 0 |
1,061,240 | 06/30/2009 00:37:54 | 4,903 | 09/06/2008 14:16:54 | 2,013 | 82 | Is client side (interface) development as a speciality dying out? | I'm seeing less and less of this on job boards, and I'm having trouble hiring an interface engineer who specializes in XHTML, CSS and JavaScript. Is this because designers are taking this on with their design duties, or programmers are now responsible for building out pages, or is it because this work is easily contracted out to companies like PSD2HTML? | xhtml | css | javascript | career-development | jobs | 02/07/2012 05:39:39 | not constructive | Is client side (interface) development as a speciality dying out?
===
I'm seeing less and less of this on job boards, and I'm having trouble hiring an interface engineer who specializes in XHTML, CSS and JavaScript. Is this because designers are taking this on with their design duties, or programmers are now responsible for building out pages, or is it because this work is easily contracted out to companies like PSD2HTML? | 4 |
8,788,330 | 01/09/2012 12:18:58 | 1,087,019 | 12/08/2011 04:30:05 | 1 | 0 | UIView splits into 2 parts with animation | I am working with UIView. I want to do animation on that view. While clicking on the view it should be divided into 2 parts and move towards both sides. Please help me with a proper solution.
| ios | null | null | null | null | 01/09/2012 18:29:16 | not a real question | UIView splits into 2 parts with animation
===
I am working with UIView. I want to do animation on that view. While clicking on the view it should be divided into 2 parts and move towards both sides. Please help me with a proper solution.
| 1 |
8,662,292 | 12/28/2011 23:06:38 | 1,120,156 | 12/28/2011 23:02:45 | 1 | 0 | R cannot be resolved - Android errorrrrrrrr | After having read the solutions they dont seem to work, I organised the imports and then deleted import.android.R; and tried to debug the Jetboy game but still the R error remains, can anybody help plz? | android | null | null | null | null | 12/29/2011 00:14:29 | not a real question | R cannot be resolved - Android errorrrrrrrr
===
After having read the solutions they dont seem to work, I organised the imports and then deleted import.android.R; and tried to debug the Jetboy game but still the R error remains, can anybody help plz? | 1 |
11,248,838 | 06/28/2012 16:19:37 | 1,489,143 | 06/28/2012 16:00:36 | 1 | 0 | Why was the current Android App made unuseable for people like me with visual impairments | Older versions were easier to see and figure out but it seems that the "updated version" has become so "styled" visually it is impossible for me to use.
Although the American Disabilities Act doesn't require a non-governmental website be accessible, the fact that many local business require participation to enter contents, I suspect a Court of Law may find this product is discriminatory.
As a business owner and marketing trainer, I can't imagine for the life of me why a company would want to make their product LESS useable for their customers, or why they would want to give this impression to their potential investors or shareholders by your inevitable "closing" of this comment without an answer.
| legal | null | null | null | null | 07/26/2012 22:38:59 | off topic | Why was the current Android App made unuseable for people like me with visual impairments
===
Older versions were easier to see and figure out but it seems that the "updated version" has become so "styled" visually it is impossible for me to use.
Although the American Disabilities Act doesn't require a non-governmental website be accessible, the fact that many local business require participation to enter contents, I suspect a Court of Law may find this product is discriminatory.
As a business owner and marketing trainer, I can't imagine for the life of me why a company would want to make their product LESS useable for their customers, or why they would want to give this impression to their potential investors or shareholders by your inevitable "closing" of this comment without an answer.
| 2 |
6,390,720 | 06/17/2011 19:18:23 | 617,952 | 02/15/2011 14:15:08 | 6 | 0 | Wordpress on Appengine | I've been using Appengine to host my site. Now i'm thinking of building the site with wordpress, for a few reasons. Does anyone know how to run a wordpress site on appengine?
I read a couple of blogs but could not understand completely. Anu suggestions? | java | php | wordpress | google-app-engine | quercus | 06/18/2011 00:29:23 | off topic | Wordpress on Appengine
===
I've been using Appengine to host my site. Now i'm thinking of building the site with wordpress, for a few reasons. Does anyone know how to run a wordpress site on appengine?
I read a couple of blogs but could not understand completely. Anu suggestions? | 2 |
11,509,023 | 07/16/2012 17:00:37 | 1,529,472 | 07/16/2012 16:16:11 | 1 | 0 | Front-end/Client Side Software | I have my database created in MS SQL 2012. it's a very simple database. I need a program or some instruction on how to make this database accessible to the end-user. I have heard of using MS Access as a front-end but what are the other methods of software that I can use to do this. Paid or Free it doesn't matter. I'm just looking for a GUI for the end user.
Thanks. | sql | sql-server | null | null | null | 07/19/2012 03:12:07 | not a real question | Front-end/Client Side Software
===
I have my database created in MS SQL 2012. it's a very simple database. I need a program or some instruction on how to make this database accessible to the end-user. I have heard of using MS Access as a front-end but what are the other methods of software that I can use to do this. Paid or Free it doesn't matter. I'm just looking for a GUI for the end user.
Thanks. | 1 |
11,601,648 | 07/22/2012 15:44:38 | 1,462,199 | 06/17/2012 18:10:35 | 27 | 0 | Building a NZB Indexer | So i want to build a NZB Indexer, you know, for fun. Im having a bit of trouble though, from my understanding when people upload files to the news servers they are split and encoded into text, where can i see whats on the news servers at any given moment? Where do sites like NZBMatrix index from ? Can anyone point me in the right direction ? | c# | .net | null | null | null | 07/24/2012 16:43:23 | not a real question | Building a NZB Indexer
===
So i want to build a NZB Indexer, you know, for fun. Im having a bit of trouble though, from my understanding when people upload files to the news servers they are split and encoded into text, where can i see whats on the news servers at any given moment? Where do sites like NZBMatrix index from ? Can anyone point me in the right direction ? | 1 |
2,132,674 | 01/25/2010 13:51:31 | 124,298 | 06/17/2009 12:38:56 | 6 | 0 | Best programming language for Image and motion processing | I'm an actionscript developer and my next project is a traffic information capture system. I'm assuming that this project will require a lot of image processing and motion capture methods on images obtained through cameras. I know I can achieve this with ActionScript, but might require sacrificing performance and accuracy. Will Java be better suited? Which is the best language for such a process? Are there any open source libraries/solutions available for this? | java | actionscript-3 | image-processing | traffic | null | 05/22/2012 12:20:08 | not constructive | Best programming language for Image and motion processing
===
I'm an actionscript developer and my next project is a traffic information capture system. I'm assuming that this project will require a lot of image processing and motion capture methods on images obtained through cameras. I know I can achieve this with ActionScript, but might require sacrificing performance and accuracy. Will Java be better suited? Which is the best language for such a process? Are there any open source libraries/solutions available for this? | 4 |
5,702,557 | 04/18/2011 12:03:54 | 340,554 | 05/13/2010 17:54:39 | 375 | 6 | Searching using regular expresions C++ | I'm using Boost.Regex to achieve something like this: search for a "|" and then take the left part of the "|" and put it a string, same with the right part:
string s1;
string s2;
who | sort
After this s1 should be "who" and s2 shoudl be "sort".
If I remember good, it was posible in Python, how can I do it using regular expresions in Boost ?
Thank you.
| c++ | boost | null | null | null | null | open | Searching using regular expresions C++
===
I'm using Boost.Regex to achieve something like this: search for a "|" and then take the left part of the "|" and put it a string, same with the right part:
string s1;
string s2;
who | sort
After this s1 should be "who" and s2 shoudl be "sort".
If I remember good, it was posible in Python, how can I do it using regular expresions in Boost ?
Thank you.
| 0 |
4,212,767 | 11/18/2010 08:08:36 | 511,820 | 11/18/2010 08:08:36 | 1 | 0 | How to unlock folder in delphi(urgent) | i had created two service,both are using same folder..i want to unlocked the folder when first service work got over..plz help????? | delphi | null | null | null | null | 11/18/2010 08:59:18 | not a real question | How to unlock folder in delphi(urgent)
===
i had created two service,both are using same folder..i want to unlocked the folder when first service work got over..plz help????? | 1 |
3,106,093 | 06/23/2010 22:42:40 | 364,941 | 06/11/2010 21:18:42 | 86 | 0 | error while compiling dsniff on mac 10.6 | I got this error when macport automatically attempted to compile it
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_dsniff/work/dsniff-2.3" && /usr/bin/make -j2 all " returned error 2
Command output: /usr/bin/gcc-4.2 -O2 -DBIND_8_COMPAT -arch x86_64 -D_BSD_SOURCE - DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP - DDSNIFF_LIBDIR=\"/opt/local/lib/\" -I. -I/opt/local/include -I/opt/local/include - I/opt/local/include -I/opt/local/include -I./missing -c ./missing/dummy.c
/usr/bin/gcc-4.2 -O2 -DBIND_8_COMPAT -arch x86_64 -D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DDSNIFF_LIBDIR=\"/opt/local/lib/\" -I. -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I./missing -c ./missing/md5.c
/usr/bin/gcc-4.2 -O2 -DBIND_8_COMPAT -arch x86_64 -D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DDSNIFF_LIBDIR=\"/opt/local/lib/\" -I. -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I./missing -c ./arpspoof.c
./arpspoof.c:25: warning: 'struct ether_addr' declared inside parameter list
./arpspoof.c:25: warning: its scope is only this definition or declaration, which is probably not what you want
./arpspoof.c:26: warning: 'struct ether_addr' declared inside parameter list
./arpspoof.c: In function 'arp_send':
./arpspoof.c:49: warning: passing argument 1 of 'libnet_get_hwaddr' from incompatible pointer type
./arpspoof.c:49: error: too many arguments to function 'libnet_get_hwaddr'
./arpspoof.c:60: warning: passing argument 6 of 'libnet_build_ethernet' from incompatible pointer type
./arpspoof.c:60: error: too few arguments to function 'libnet_build_ethernet'
./arpspoof.c:64: error: 'ETH_H' undeclared (first use in this function)
./arpspoof.c:64: error: (Each undeclared identifier is reported only once
./arpspoof.c:64: error: for each function it appears in.)
./arpspoof.c:64: error: too few arguments to function 'libnet_build_arp'
./arpspoof.c:67: warning: passing argument 1 of 'ether_ntoa' from incompatible pointer type
./arpspoof.c:71: warning: passing argument 1 of 'ether_ntoa' from incompatible pointer type
./arpspoof.c:73: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
./arpspoof.c:73: warning: format '%s' expects type 'char *', but argument 5 has type 'int'
./arpspoof.c:77: warning: passing argument 1 of 'ether_ntoa' from incompatible pointer type
./arpspoof.c:78: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
./arpspoof.c:80: warning: passing argument 1 of 'ether_ntoa' from incompatible pointer type
./arpspoof.c: In function 'arp_find':
./arpspoof.c:114: warning: passing argument 2 of 'arp_cache_lookup' from incompatible pointer type
./arpspoof.c: In function 'main':
./arpspoof.c:181: warning: assignment makes pointer from integer without a cast
make: *** [arpspoof.o] Error 1
make: *** Waiting for unfinished jobs....
Any idea? | osx | null | null | null | null | null | open | error while compiling dsniff on mac 10.6
===
I got this error when macport automatically attempted to compile it
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_dsniff/work/dsniff-2.3" && /usr/bin/make -j2 all " returned error 2
Command output: /usr/bin/gcc-4.2 -O2 -DBIND_8_COMPAT -arch x86_64 -D_BSD_SOURCE - DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP - DDSNIFF_LIBDIR=\"/opt/local/lib/\" -I. -I/opt/local/include -I/opt/local/include - I/opt/local/include -I/opt/local/include -I./missing -c ./missing/dummy.c
/usr/bin/gcc-4.2 -O2 -DBIND_8_COMPAT -arch x86_64 -D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DDSNIFF_LIBDIR=\"/opt/local/lib/\" -I. -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I./missing -c ./missing/md5.c
/usr/bin/gcc-4.2 -O2 -DBIND_8_COMPAT -arch x86_64 -D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DDSNIFF_LIBDIR=\"/opt/local/lib/\" -I. -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I./missing -c ./arpspoof.c
./arpspoof.c:25: warning: 'struct ether_addr' declared inside parameter list
./arpspoof.c:25: warning: its scope is only this definition or declaration, which is probably not what you want
./arpspoof.c:26: warning: 'struct ether_addr' declared inside parameter list
./arpspoof.c: In function 'arp_send':
./arpspoof.c:49: warning: passing argument 1 of 'libnet_get_hwaddr' from incompatible pointer type
./arpspoof.c:49: error: too many arguments to function 'libnet_get_hwaddr'
./arpspoof.c:60: warning: passing argument 6 of 'libnet_build_ethernet' from incompatible pointer type
./arpspoof.c:60: error: too few arguments to function 'libnet_build_ethernet'
./arpspoof.c:64: error: 'ETH_H' undeclared (first use in this function)
./arpspoof.c:64: error: (Each undeclared identifier is reported only once
./arpspoof.c:64: error: for each function it appears in.)
./arpspoof.c:64: error: too few arguments to function 'libnet_build_arp'
./arpspoof.c:67: warning: passing argument 1 of 'ether_ntoa' from incompatible pointer type
./arpspoof.c:71: warning: passing argument 1 of 'ether_ntoa' from incompatible pointer type
./arpspoof.c:73: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
./arpspoof.c:73: warning: format '%s' expects type 'char *', but argument 5 has type 'int'
./arpspoof.c:77: warning: passing argument 1 of 'ether_ntoa' from incompatible pointer type
./arpspoof.c:78: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
./arpspoof.c:80: warning: passing argument 1 of 'ether_ntoa' from incompatible pointer type
./arpspoof.c: In function 'arp_find':
./arpspoof.c:114: warning: passing argument 2 of 'arp_cache_lookup' from incompatible pointer type
./arpspoof.c: In function 'main':
./arpspoof.c:181: warning: assignment makes pointer from integer without a cast
make: *** [arpspoof.o] Error 1
make: *** Waiting for unfinished jobs....
Any idea? | 0 |
9,918,890 | 03/29/2012 03:58:03 | 1,148,562 | 01/13/2012 21:35:26 | 1 | 1 | PHP spintext, need help saving to the database. | `function ParseSpinText($s) {
preg_match('#{(.+?)}#is',$s,$m);
if(empty($m)) return $s;
$t = $m[1];
if(strpos($t,'{')!==false){
$t = substr($t, strrpos($t,'{') + 1);
}
$parts = explode("|", $t);
$s = preg_replace("+{".preg_quote($t)."}+is", $parts[array_rand($parts)], $s, 1);
return ParseSpinText($s);
}
echo ParseSpinText('{This|Here} is {some|a {little|wee} bit of} {example|sample} text.');
`
ideally where I echod this out, I want it to echo out all spins instead of having to copy the echo line a bunch of times, I want to save each spin to a database.
| php | mysql | null | null | null | 03/29/2012 06:02:31 | not a real question | PHP spintext, need help saving to the database.
===
`function ParseSpinText($s) {
preg_match('#{(.+?)}#is',$s,$m);
if(empty($m)) return $s;
$t = $m[1];
if(strpos($t,'{')!==false){
$t = substr($t, strrpos($t,'{') + 1);
}
$parts = explode("|", $t);
$s = preg_replace("+{".preg_quote($t)."}+is", $parts[array_rand($parts)], $s, 1);
return ParseSpinText($s);
}
echo ParseSpinText('{This|Here} is {some|a {little|wee} bit of} {example|sample} text.');
`
ideally where I echod this out, I want it to echo out all spins instead of having to copy the echo line a bunch of times, I want to save each spin to a database.
| 1 |
10,646,299 | 05/18/2012 03:22:54 | 306,857 | 04/01/2010 12:29:19 | 136 | 0 | Sharing information computed by monad actions | I am studying compiler construction using Haskell. I am using fixed point data type recursion to represent abstract syntax trees (ast).
I am investigating how to write the type checker for a toy language having simple expressions (numeric and logic constants, binary operations and local variable declarations).
The type checker is a read-write-state (`RWS`) monad:
- reader because it uses a context consisting of an environment with symbol definitions (an association list of a symbol and its type);
- writer because it generates a list of error messages;
- state will be needed later for implementing nominal type equivalence, and by now I am just counting how many variables are defined in the program (just as a demonstration of its use).
The value returned by the monad is an ast annotated with types (for expressions) or environments (for declarations).
The function `checker` receives an ast of the input program and results in a new ast annotated with `RWS` monad actions that, when run, gives the type (if the ast is an expression) or the environment (if the ast is a declaration).
For instance, consider the input program
let x = 2 + 3 in 1 + x
with the corresponding ast:
Let
|
-----------------------
| |
VarDec: x Bin Add
| |
| ------------
| | |
Bin Add Num 1.0 Var x
|
-----------
| |
Num 2.0 Num 3.0
Type checking it will produce the following ast:
action1
Let
|
-----------------------
| |
action2 action3
VarDec: x Bin Add
| |
| ------------
| | |
action4 action5 action6
Bin Add Num 1.0 Var x
|
-----------
| |
action7 action8
Num 2.0 Num 3.0
which is recursively annotated with `RWS` monad actions.
Later phases of the compiler will need to know the information produced by the annotations in the ast (and its children, recursively). Therefore it will be needed to run the corresponding action to get it.
A root action is constructed by composing the actions of the children, according to the rules of the language.
For instance, in order to get the type of the root expression (a let expression), `action1` has to be run, and that will make `action2` and `action3` to be run as well, because when `action1` was created, it used `action2` and `action3`.
When the type of the addition `1+x` is needed, `action3` has to be run in order to get it.
So actions will be run repeatedly. The way the type checker is structured (using `RWS` monad actions) loses sharing of the computed information for each node of the ast.
Is there any technique to recover this sharing, eliminating the need of recomputing actions? | haskell | compiler | monads | sharing | null | null | open | Sharing information computed by monad actions
===
I am studying compiler construction using Haskell. I am using fixed point data type recursion to represent abstract syntax trees (ast).
I am investigating how to write the type checker for a toy language having simple expressions (numeric and logic constants, binary operations and local variable declarations).
The type checker is a read-write-state (`RWS`) monad:
- reader because it uses a context consisting of an environment with symbol definitions (an association list of a symbol and its type);
- writer because it generates a list of error messages;
- state will be needed later for implementing nominal type equivalence, and by now I am just counting how many variables are defined in the program (just as a demonstration of its use).
The value returned by the monad is an ast annotated with types (for expressions) or environments (for declarations).
The function `checker` receives an ast of the input program and results in a new ast annotated with `RWS` monad actions that, when run, gives the type (if the ast is an expression) or the environment (if the ast is a declaration).
For instance, consider the input program
let x = 2 + 3 in 1 + x
with the corresponding ast:
Let
|
-----------------------
| |
VarDec: x Bin Add
| |
| ------------
| | |
Bin Add Num 1.0 Var x
|
-----------
| |
Num 2.0 Num 3.0
Type checking it will produce the following ast:
action1
Let
|
-----------------------
| |
action2 action3
VarDec: x Bin Add
| |
| ------------
| | |
action4 action5 action6
Bin Add Num 1.0 Var x
|
-----------
| |
action7 action8
Num 2.0 Num 3.0
which is recursively annotated with `RWS` monad actions.
Later phases of the compiler will need to know the information produced by the annotations in the ast (and its children, recursively). Therefore it will be needed to run the corresponding action to get it.
A root action is constructed by composing the actions of the children, according to the rules of the language.
For instance, in order to get the type of the root expression (a let expression), `action1` has to be run, and that will make `action2` and `action3` to be run as well, because when `action1` was created, it used `action2` and `action3`.
When the type of the addition `1+x` is needed, `action3` has to be run in order to get it.
So actions will be run repeatedly. The way the type checker is structured (using `RWS` monad actions) loses sharing of the computed information for each node of the ast.
Is there any technique to recover this sharing, eliminating the need of recomputing actions? | 0 |
8,518,315 | 12/15/2011 10:09:03 | 293,545 | 03/14/2010 19:56:22 | 786 | 7 | Trying to open a storyboard from monotouch is giving me an error | I have created a masterdetail storyboard application within montouch. When I try double clicking on the storyboard to open it up in xcode I get an error
> Error updating Xcode project`. Could not generate outlet 'DetailItem' in class 'LCMasterDetail.DetailViewController' as its type 'System.String' could not be resolved to Obj-C.
MonoDevelop.MacDev.ObjCIntegration.ObjectiveCGenerationException: Could not generate outlet' DetailItem' in class 'LCMasterDetail.DetailViewController' as its type 'System.String' could not be resolved to Obj-C
at MonoDevelop.MacDev.ObjCIntegration.NSObjectTypeInfo.GenerateObjcType (System.String directory, System.String[] frameworks) [0x001e8] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectTypeInfo.cs:159
at MonoDevelop.MacDev.XcodeSyncing.XcodeSyncedType.SyncOut (MonoDevelop.MacDev.XcodeSyncing.XcodeSyncContext context) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeSyncedType.cs:64
at MonoDevelop.MacDev.XcodeSyncing.XcodeMonitor.UpdateProject (IProgressMonitor monitor, System.Collections.Generic.List`1 allItems, MonoDevelop.MacDev.XcodeIntegration.XcodeProject emptyProject) [0x00324] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs:137
at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateXcodeProject (IProgressMonitor monitor) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:315
Been a newbie noob to monotouch I have no clue whats wrong.
Anyone else had this problem? | monotouch | null | null | null | null | null | open | Trying to open a storyboard from monotouch is giving me an error
===
I have created a masterdetail storyboard application within montouch. When I try double clicking on the storyboard to open it up in xcode I get an error
> Error updating Xcode project`. Could not generate outlet 'DetailItem' in class 'LCMasterDetail.DetailViewController' as its type 'System.String' could not be resolved to Obj-C.
MonoDevelop.MacDev.ObjCIntegration.ObjectiveCGenerationException: Could not generate outlet' DetailItem' in class 'LCMasterDetail.DetailViewController' as its type 'System.String' could not be resolved to Obj-C
at MonoDevelop.MacDev.ObjCIntegration.NSObjectTypeInfo.GenerateObjcType (System.String directory, System.String[] frameworks) [0x001e8] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectTypeInfo.cs:159
at MonoDevelop.MacDev.XcodeSyncing.XcodeSyncedType.SyncOut (MonoDevelop.MacDev.XcodeSyncing.XcodeSyncContext context) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeSyncedType.cs:64
at MonoDevelop.MacDev.XcodeSyncing.XcodeMonitor.UpdateProject (IProgressMonitor monitor, System.Collections.Generic.List`1 allItems, MonoDevelop.MacDev.XcodeIntegration.XcodeProject emptyProject) [0x00324] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs:137
at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateXcodeProject (IProgressMonitor monitor) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:315
Been a newbie noob to monotouch I have no clue whats wrong.
Anyone else had this problem? | 0 |
9,572,912 | 03/05/2012 19:45:32 | 171,632 | 09/10/2009 18:52:20 | 1,419 | 56 | What is the correct use of RedirectPermanent? | I am working on an eCommerce site that passes product ids in the query string. I just had to fix an issue where the product page didn't check the status of the product (live or archived) so if the user had a direct link e.g. a search result, the product would still display even if it had a status of "Archived". My simple fix was `Response.Redirect("~/Products/Default.aspx");` Should I use `RedirectPermanent` in this situation even if it is possible the product may come back online? Thanks! | c# | asp.net | redirect | null | null | null | open | What is the correct use of RedirectPermanent?
===
I am working on an eCommerce site that passes product ids in the query string. I just had to fix an issue where the product page didn't check the status of the product (live or archived) so if the user had a direct link e.g. a search result, the product would still display even if it had a status of "Archived". My simple fix was `Response.Redirect("~/Products/Default.aspx");` Should I use `RedirectPermanent` in this situation even if it is possible the product may come back online? Thanks! | 0 |
2,066,270 | 01/14/2010 17:52:21 | 105,084 | 05/12/2009 01:13:48 | 397 | 8 | What is the best Open Source, linux-compatible UML modeling tool? | I've been looking around at the different options, and it seems that even some of the most popular open source tools are Windows-only (StarUML, for example). What is the best open source alternative to programs like Visio and Rational Rose for linux? | uml | uml-modeling | linux | open-source | null | 09/10/2011 19:54:55 | not constructive | What is the best Open Source, linux-compatible UML modeling tool?
===
I've been looking around at the different options, and it seems that even some of the most popular open source tools are Windows-only (StarUML, for example). What is the best open source alternative to programs like Visio and Rational Rose for linux? | 4 |
6,950,714 | 08/05/2011 02:15:43 | 356,899 | 12/03/2009 23:01:27 | 6 | 0 | Any reason I should not switch to Jenkins | We are thinking about using Jenkins as our CI server. I used to use Bamboo in my last company. I don't love it, but it works alright.
Here is my short checklist.
* Git
* Maven
* FishEye
* Crucible/Gerrit
* Jira
* Support of distributed build farm
* Single sign-on with LDAP support
Am I missing anything ?
| continuous-integration | null | null | null | null | 08/25/2011 01:46:35 | not a real question | Any reason I should not switch to Jenkins
===
We are thinking about using Jenkins as our CI server. I used to use Bamboo in my last company. I don't love it, but it works alright.
Here is my short checklist.
* Git
* Maven
* FishEye
* Crucible/Gerrit
* Jira
* Support of distributed build farm
* Single sign-on with LDAP support
Am I missing anything ?
| 1 |
2,783,602 | 05/06/2010 18:49:40 | 186,787 | 10/08/2009 22:07:06 | 81 | 2 | Hibernate: delete many-to-many association | I have two tables with the many-to-many association.
— DB fragment:
**loads**
Id
Name
**sessions**
Id
Date
**_sessionsloads_**
LoadId
SessionId
— Hibernate mapping fragments:
/* loads.hbm.xml */
<set name="sessions" table="sessionsloads" inverse="true">
<key column="LoadId" />
<many-to-many column="SessionId" class="Session" />
</set>
…
/* sessions.hbm.xml */
<set name="loads" table="sessionsloads">
<key column="SessionId" />
<many-to-many column="LoadId" class="Load" />
</set>
In order to remove one entry from the association table _sessionsloads_, I execute this code:
Session session = sessionDao.getObject(sessionId);
Load load = loadDao.getObject(loadId);
load.getSessions().remove(session);
loadDao.saveObject(load);
But, after launching, this code change nothing.
What's the right way to remove an association? | java | hibernate | many-to-many | null | null | null | open | Hibernate: delete many-to-many association
===
I have two tables with the many-to-many association.
— DB fragment:
**loads**
Id
Name
**sessions**
Id
Date
**_sessionsloads_**
LoadId
SessionId
— Hibernate mapping fragments:
/* loads.hbm.xml */
<set name="sessions" table="sessionsloads" inverse="true">
<key column="LoadId" />
<many-to-many column="SessionId" class="Session" />
</set>
…
/* sessions.hbm.xml */
<set name="loads" table="sessionsloads">
<key column="SessionId" />
<many-to-many column="LoadId" class="Load" />
</set>
In order to remove one entry from the association table _sessionsloads_, I execute this code:
Session session = sessionDao.getObject(sessionId);
Load load = loadDao.getObject(loadId);
load.getSessions().remove(session);
loadDao.saveObject(load);
But, after launching, this code change nothing.
What's the right way to remove an association? | 0 |
11,116,769 | 06/20/2012 09:40:17 | 1,468,756 | 06/20/2012 09:33:02 | 1 | 0 | how to combine two __m128 to __m256 | Something like this:
__m128 a=_mm_set_ps(1,2,3,4),b =_mm_set_ps(5,6,7,8)=> __m256 c (1,2,3,4,5,6,7,8)
is there any Intrinsics that I can use? How to? thanks a lot! | sse | avx | null | null | null | null | open | how to combine two __m128 to __m256
===
Something like this:
__m128 a=_mm_set_ps(1,2,3,4),b =_mm_set_ps(5,6,7,8)=> __m256 c (1,2,3,4,5,6,7,8)
is there any Intrinsics that I can use? How to? thanks a lot! | 0 |
8,803,115 | 01/10/2012 12:15:06 | 1,140,754 | 01/10/2012 11:45:15 | 1 | 0 | Java 7 API - MethodHandle example throws WrongMethodTypeException on invokeExact call | The example shown in the description of the `MethodHandle` class throws a `WrongMethodTypeException` in the invocation of the statement `mh.invokeExact("daddy",'d','n')` with the following description: ` (CC)Ljava/lang/String; cannot be called with a different arity as ([Ljava/lang/Object;)Ljava/lang/Object; `.
The `MethodHandle` object `mh` has a symbolic type descriptor corresponding to: `(CC)Ljava/lang/String`. But when we are invoking `mh.invokeExact("daddy",'d','n') `, the arguments: `d` and `n` are passed as an `Object` array and then they are not matching with the arguments of the type `char`.
I know that I can resolve the above problem using the `invokeWithArguments` instead of the `invokeExcat` or the `invoke`, but this example was supposed to work as presented in the description of the `MethodHandle` of Java 7 API. Besides that, the `invokeWithArguments` has a performance overhead in relation to `invoke`/`invokeExact`.
| java | invokedynamic | methodhandle | null | null | null | open | Java 7 API - MethodHandle example throws WrongMethodTypeException on invokeExact call
===
The example shown in the description of the `MethodHandle` class throws a `WrongMethodTypeException` in the invocation of the statement `mh.invokeExact("daddy",'d','n')` with the following description: ` (CC)Ljava/lang/String; cannot be called with a different arity as ([Ljava/lang/Object;)Ljava/lang/Object; `.
The `MethodHandle` object `mh` has a symbolic type descriptor corresponding to: `(CC)Ljava/lang/String`. But when we are invoking `mh.invokeExact("daddy",'d','n') `, the arguments: `d` and `n` are passed as an `Object` array and then they are not matching with the arguments of the type `char`.
I know that I can resolve the above problem using the `invokeWithArguments` instead of the `invokeExcat` or the `invoke`, but this example was supposed to work as presented in the description of the `MethodHandle` of Java 7 API. Besides that, the `invokeWithArguments` has a performance overhead in relation to `invoke`/`invokeExact`.
| 0 |
8,777,064 | 01/08/2012 11:21:02 | 1,061,104 | 11/23/2011 03:48:47 | 5 | 0 | Picture Password Source | Is it possible to recreate the picture password as a login mechanism for your .NET application? Or is there some law stating it cant be done because you'll get sued?
http://blogs.msdn.com/b/b8/archive/2011/12/16/signing-in-with-a-picture-password.aspx | c# | windows | login | passwords | login-control | 01/09/2012 10:31:10 | off topic | Picture Password Source
===
Is it possible to recreate the picture password as a login mechanism for your .NET application? Or is there some law stating it cant be done because you'll get sued?
http://blogs.msdn.com/b/b8/archive/2011/12/16/signing-in-with-a-picture-password.aspx | 2 |
8,349,047 | 12/01/2011 22:12:41 | 956,949 | 09/21/2011 12:31:09 | 1 | 3 | Xcode quit unexpectedly | After update my MacBook to Snow Leopard I installed a new xcode 4 but he didn't opened: "Xcode quit unexpectedly".
Xcode encountered an internal logic error. Choose "Continue" to continue running Xcode in an inconsistent state. Choose "Crash" to halt Xcode and file a bug with Crash Reporter. Choosing "Crash" will result in the loss of all unsaved data.
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Couldn't load plug-in 'com.apple.dt.gpu.GPURenderTargetEditor' while firing fault for extension 'Xcode.IDEKit.EditorDocument.GPUTrace'
UserInfo: {
NSUnderlyingError = "Error Domain=DVTPlugInErrorDomain Code=2 UserInfo=0x2009f9180 \"Loading a plug-in failed.\" Underlying Error=(Error Domain=NSCocoaErrorDomain Code=3587 UserInfo=0x2009fb080 \"The bundle \U201cGPUDebuggerFoundation\U201d couldn\U2019t be loaded because it is damaged or missing necessary resources.\" (dlopen_preflight(/Developer/Library/Xcode/PrivatePlugIns/GPUDebuggerFoundation.ideplugin/Contents/MacOS/GPUDebuggerFoundation): Library not loaded: /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice\n Referenced from: /Developer/Applications/Xcode.app/Contents/MacOS/../../../../Library/PrivateFrameworks/GPUTools.framework/Versions/A/GPUTools\n Reason: image not found))";
}
Hints: None
Backtrace:
0 0x00007fff89d2f766 __exceptionPreprocess (in CoreFoundation)
1 0x00007fff865c1f03 objc_exception_throw (in libobjc.A.dylib)
2 0x000000010001bdf0 -[DVTExtension _fireExtensionFault] (in DVTFoundation)
3 0x0000000100006096 __38-[DVTDispatchLock performLockedBlock:]_block_invoke_0 (in DVTFoundation)
4 0x00007fff88454fbb dispatch_barrier_sync_f (in libSystem.B.dylib)
5 0x000000010000603f -[DVTDispatchLock performLockedBlock:] (in DVTFoundation)
6 0x000000010001bb8b -[DVTExtension _valueForKey:inParameterData:usingSchema:] (in DVTFoundation)
7 0x000000010001bacf -[DVTExtension valueForKey:] (in DVTFoundation)
8 0x0000000100a0f711 +[IDEEditorDocument _validateDocumentExtension:] (in IDEKit)
9 0x0000000100946b06 __60+[IDEDocumentController _THREAD_allEditorDocumentExtensions]_block_invoke_0 (in IDEKit)
10 0x00007fff88438705 dispatch_once_f (in libSystem.B.dylib)
11 0x0000000100946893 +[IDEDocumentController _THREAD_allEditorDocumentExtensions] (in IDEKit)
12 0x0000000100b0650d -[IDEDocumentController documentClassNames] (in IDEKit)
13 0x00007fff8045fbee -[NSDocumentController(NSInternal) _installOpenRecentMenus] (in AppKit)
14 0x00007fff80428dd9 -[NSApplication finishLaunching] (in AppKit)
15 0x00007fff80428554 -[NSApplication run] (in AppKit)
16 0x00007fff804213b0 NSApplicationMain (in AppKit)
17 0x0000000100000eec
18 0x0000000000000002
What I need to do? | ios | osx | osx-snow-leopard | null | null | 12/14/2011 02:29:23 | off topic | Xcode quit unexpectedly
===
After update my MacBook to Snow Leopard I installed a new xcode 4 but he didn't opened: "Xcode quit unexpectedly".
Xcode encountered an internal logic error. Choose "Continue" to continue running Xcode in an inconsistent state. Choose "Crash" to halt Xcode and file a bug with Crash Reporter. Choosing "Crash" will result in the loss of all unsaved data.
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Couldn't load plug-in 'com.apple.dt.gpu.GPURenderTargetEditor' while firing fault for extension 'Xcode.IDEKit.EditorDocument.GPUTrace'
UserInfo: {
NSUnderlyingError = "Error Domain=DVTPlugInErrorDomain Code=2 UserInfo=0x2009f9180 \"Loading a plug-in failed.\" Underlying Error=(Error Domain=NSCocoaErrorDomain Code=3587 UserInfo=0x2009fb080 \"The bundle \U201cGPUDebuggerFoundation\U201d couldn\U2019t be loaded because it is damaged or missing necessary resources.\" (dlopen_preflight(/Developer/Library/Xcode/PrivatePlugIns/GPUDebuggerFoundation.ideplugin/Contents/MacOS/GPUDebuggerFoundation): Library not loaded: /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice\n Referenced from: /Developer/Applications/Xcode.app/Contents/MacOS/../../../../Library/PrivateFrameworks/GPUTools.framework/Versions/A/GPUTools\n Reason: image not found))";
}
Hints: None
Backtrace:
0 0x00007fff89d2f766 __exceptionPreprocess (in CoreFoundation)
1 0x00007fff865c1f03 objc_exception_throw (in libobjc.A.dylib)
2 0x000000010001bdf0 -[DVTExtension _fireExtensionFault] (in DVTFoundation)
3 0x0000000100006096 __38-[DVTDispatchLock performLockedBlock:]_block_invoke_0 (in DVTFoundation)
4 0x00007fff88454fbb dispatch_barrier_sync_f (in libSystem.B.dylib)
5 0x000000010000603f -[DVTDispatchLock performLockedBlock:] (in DVTFoundation)
6 0x000000010001bb8b -[DVTExtension _valueForKey:inParameterData:usingSchema:] (in DVTFoundation)
7 0x000000010001bacf -[DVTExtension valueForKey:] (in DVTFoundation)
8 0x0000000100a0f711 +[IDEEditorDocument _validateDocumentExtension:] (in IDEKit)
9 0x0000000100946b06 __60+[IDEDocumentController _THREAD_allEditorDocumentExtensions]_block_invoke_0 (in IDEKit)
10 0x00007fff88438705 dispatch_once_f (in libSystem.B.dylib)
11 0x0000000100946893 +[IDEDocumentController _THREAD_allEditorDocumentExtensions] (in IDEKit)
12 0x0000000100b0650d -[IDEDocumentController documentClassNames] (in IDEKit)
13 0x00007fff8045fbee -[NSDocumentController(NSInternal) _installOpenRecentMenus] (in AppKit)
14 0x00007fff80428dd9 -[NSApplication finishLaunching] (in AppKit)
15 0x00007fff80428554 -[NSApplication run] (in AppKit)
16 0x00007fff804213b0 NSApplicationMain (in AppKit)
17 0x0000000100000eec
18 0x0000000000000002
What I need to do? | 2 |
10,272,078 | 04/22/2012 21:00:06 | 348,567 | 05/23/2010 23:51:59 | 33 | 0 | Facebook linter returns “Error parsing input URL” although most info shows up if FB button is activated | I’m trying to troubleshoot a specific behavior. The last entry I wrote on a WordPress blog returns no data when run through Facebook’s Object Debugger (linter). I just get a “Error Parsing URL:Error parsing input URL, no data was scraped.”
- However, if I try with any previous post, all seems to be fine: the linter scrape the page correctly;
- If the Facebook button under the problematic entry is clicked, a snippet is correctly produced, except for a thumbnail of the image: permalink, summary, all is correct.
- When I examined the source code of for the permalink entry in my browser, I can see all tags correctly displayed, even the `og:image` tag (the URL is valid).
This is sudden behavior. I didn’t experience any problem since I setup Facebook Open Graph protocol on my blog.
P. | facebook | null | null | null | null | null | open | Facebook linter returns “Error parsing input URL” although most info shows up if FB button is activated
===
I’m trying to troubleshoot a specific behavior. The last entry I wrote on a WordPress blog returns no data when run through Facebook’s Object Debugger (linter). I just get a “Error Parsing URL:Error parsing input URL, no data was scraped.”
- However, if I try with any previous post, all seems to be fine: the linter scrape the page correctly;
- If the Facebook button under the problematic entry is clicked, a snippet is correctly produced, except for a thumbnail of the image: permalink, summary, all is correct.
- When I examined the source code of for the permalink entry in my browser, I can see all tags correctly displayed, even the `og:image` tag (the URL is valid).
This is sudden behavior. I didn’t experience any problem since I setup Facebook Open Graph protocol on my blog.
P. | 0 |
11,311,985 | 07/03/2012 13:27:40 | 395,090 | 07/18/2010 10:09:53 | 36 | 1 | exec() and my stupidity | I just wanted to share my stupidity and how I used up all the disk space, about 90 GB with a couple of lines of code.
All I wanted to do was to list out all the files in a directory (including the sub-directory) containing a set of string and save the information in a file. I thought find would help, I tested that as well....
find . -exec grep -i "TEXT_TO_FIND" '{}' \; -print >TEXT_TO_FIND.txt
However, I need to pick up the string to search dynamically and build the command string dynamically, after figuring out the right way of building the command string , I ran my program. I thought exec() would wait
for a signal from the Operating system that the task has finished. I think it does not. Even if it did, my program will never complete because it would also search in the files which I have been creating by redirecting,
the output and thus grep was running indefinitely until all the disk space was utilized.
I just want to confirm that `Runtime.getRuntime().exec(cmd);` does not wait for any signal from OS. | java | linux | null | null | null | 07/03/2012 14:08:36 | not a real question | exec() and my stupidity
===
I just wanted to share my stupidity and how I used up all the disk space, about 90 GB with a couple of lines of code.
All I wanted to do was to list out all the files in a directory (including the sub-directory) containing a set of string and save the information in a file. I thought find would help, I tested that as well....
find . -exec grep -i "TEXT_TO_FIND" '{}' \; -print >TEXT_TO_FIND.txt
However, I need to pick up the string to search dynamically and build the command string dynamically, after figuring out the right way of building the command string , I ran my program. I thought exec() would wait
for a signal from the Operating system that the task has finished. I think it does not. Even if it did, my program will never complete because it would also search in the files which I have been creating by redirecting,
the output and thus grep was running indefinitely until all the disk space was utilized.
I just want to confirm that `Runtime.getRuntime().exec(cmd);` does not wait for any signal from OS. | 1 |
11,460,878 | 07/12/2012 21:21:49 | 1,055,881 | 11/20/2011 00:32:44 | 53 | 1 | VC++ LNK2019 Error I can't seem to fix | So I was writing, as a small project, a stress test. Initially, to save time, I just plopped code in a header file. I decided to organise it a bit, and moved everything to a .cpp file and then wrote the header file, but VS2010 presented me with an LNK2019 that I can't seem to fix.
**FSTRESS.cpp** (Didn't include code, because I doubt it is relevant; ask if you need it)
![FSTRESS.cpp][1]
**FSTRESS.h**
![FSTRESS.h][2]
**Main.cpp**
![Main.cpp][3]
The error:
error LNK2019: unresolved external symbol "public: static void __cdecl FSTRESS::Start(unsigned int,unsigned int,unsigned int)" (?Start@FSTRESS@@SAXIII@Z) referenced in function _main C:\Programming\C++\FLOPS_Test\FSTRESS\FSTRESS\main.obj FSTRESS_Mk.II
Any ideas on why this is happening? I'm a bit of a C++ noob.
Thanks for any help :)
[1]: http://i.stack.imgur.com/F80Ti.png
[2]: http://i.stack.imgur.com/fY7DD.png
[3]: http://i.stack.imgur.com/R3EJO.png | c++ | null | null | null | null | null | open | VC++ LNK2019 Error I can't seem to fix
===
So I was writing, as a small project, a stress test. Initially, to save time, I just plopped code in a header file. I decided to organise it a bit, and moved everything to a .cpp file and then wrote the header file, but VS2010 presented me with an LNK2019 that I can't seem to fix.
**FSTRESS.cpp** (Didn't include code, because I doubt it is relevant; ask if you need it)
![FSTRESS.cpp][1]
**FSTRESS.h**
![FSTRESS.h][2]
**Main.cpp**
![Main.cpp][3]
The error:
error LNK2019: unresolved external symbol "public: static void __cdecl FSTRESS::Start(unsigned int,unsigned int,unsigned int)" (?Start@FSTRESS@@SAXIII@Z) referenced in function _main C:\Programming\C++\FLOPS_Test\FSTRESS\FSTRESS\main.obj FSTRESS_Mk.II
Any ideas on why this is happening? I'm a bit of a C++ noob.
Thanks for any help :)
[1]: http://i.stack.imgur.com/F80Ti.png
[2]: http://i.stack.imgur.com/fY7DD.png
[3]: http://i.stack.imgur.com/R3EJO.png | 0 |
1,258,410 | 08/11/2009 03:58:46 | 8,678 | 09/15/2008 16:34:57 | 499 | 19 | Tricks for quickly turning DB table into html markup for aspx page? | Does anyone have any tricks for quickly laying out the asp.net html markup for a specific database table?
For example, say I have a table "Company", and I just want to render a textbox for all the columns.
One trick that I thought I saw and confirmed to work was to do some markup like so:
<p><label for="zzzz">zzzz</label><asp:TextBox ID="zzzz" Text='<%# Bind("zzzz")%>' runat="server" /></p>
<p><label for="zzzz">zzzz</label><asp:TextBox ID="zzzz" Text='<%# Bind("zzzz")%>' runat="server" /></p>
<p><label for="zzzz">zzzz</label><asp:TextBox ID="zzzz" Text='<%# Bind("zzzz")%>' runat="server" /></p>
<p><label for="zzzz">zzzz</label><asp:TextBox ID="zzzz" Text='<%# Bind("zzzz")%>' runat="server" /></p>
<p><label for="zzzz">zzzz</label><asp:TextBox ID="zzzz" Text='<%# Bind("zzzz")%>' runat="server" /></p>
<p><label for="zzzz">zzzz</label><asp:TextBox ID="zzzz" Text='<%# Bind("zzzz")%>' runat="server" /></p>
Basically, one per row in your database table.
Then, select (in SQL Server):
select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'Company'
Highlight the COLUMN_NAME column in the resulting output and copy to clipboard.
Then, using the ALT+drag trick to highlight a vertical column, highlight the zzzz's in your markup (starting from the right so things keep lining up), and paste the column names over top. I swear I saw this done in a video, and I tried it myself and it worked, but tonight I can't seem to make it work.
Of course, an even better way to do this would be through T4 or some kind of code generation like that, and just have every table render default html into a folder such as \CodeGen\EditForms where you could copy and paste from, but for that I don't know where to start.
| asp.net | t4 | tips-and-tricks | null | null | 12/21/2011 14:15:08 | not constructive | Tricks for quickly turning DB table into html markup for aspx page?
===
Does anyone have any tricks for quickly laying out the asp.net html markup for a specific database table?
For example, say I have a table "Company", and I just want to render a textbox for all the columns.
One trick that I thought I saw and confirmed to work was to do some markup like so:
<p><label for="zzzz">zzzz</label><asp:TextBox ID="zzzz" Text='<%# Bind("zzzz")%>' runat="server" /></p>
<p><label for="zzzz">zzzz</label><asp:TextBox ID="zzzz" Text='<%# Bind("zzzz")%>' runat="server" /></p>
<p><label for="zzzz">zzzz</label><asp:TextBox ID="zzzz" Text='<%# Bind("zzzz")%>' runat="server" /></p>
<p><label for="zzzz">zzzz</label><asp:TextBox ID="zzzz" Text='<%# Bind("zzzz")%>' runat="server" /></p>
<p><label for="zzzz">zzzz</label><asp:TextBox ID="zzzz" Text='<%# Bind("zzzz")%>' runat="server" /></p>
<p><label for="zzzz">zzzz</label><asp:TextBox ID="zzzz" Text='<%# Bind("zzzz")%>' runat="server" /></p>
Basically, one per row in your database table.
Then, select (in SQL Server):
select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'Company'
Highlight the COLUMN_NAME column in the resulting output and copy to clipboard.
Then, using the ALT+drag trick to highlight a vertical column, highlight the zzzz's in your markup (starting from the right so things keep lining up), and paste the column names over top. I swear I saw this done in a video, and I tried it myself and it worked, but tonight I can't seem to make it work.
Of course, an even better way to do this would be through T4 or some kind of code generation like that, and just have every table render default html into a folder such as \CodeGen\EditForms where you could copy and paste from, but for that I don't know where to start.
| 4 |
3,085,233 | 06/21/2010 13:55:17 | 275,361 | 02/17/2010 15:22:19 | 11 | 0 | Thread creation time on windows xp | Can any one help me in identifying the total time consumed while creating a thread and deleting a thread on windows xp, assuming the same configurations.
Thanks. | multithreading | windows-xp | null | null | null | null | open | Thread creation time on windows xp
===
Can any one help me in identifying the total time consumed while creating a thread and deleting a thread on windows xp, assuming the same configurations.
Thanks. | 0 |
8,973,909 | 01/23/2012 15:18:31 | 555,690 | 12/28/2010 06:15:35 | 1,217 | 18 | White color overlay on CCSprite | I'd like to apply some kind of "color overlay" over a CCSprite of mine. Basically, tint it completely white.
I can use
mySprite.color = ccc3(0,0,0);
And my sprite gets a black color overlay. However,
mySprite.color = ccc3(255,255,255);
Will, naturally, not affect my sprite. Instead, my sprite keeps its original color.
So, is there another method to achieve such? I really can't afford to make a white version of all my animations/sprites etc. | objective-c | cocos2d-iphone | null | null | null | null | open | White color overlay on CCSprite
===
I'd like to apply some kind of "color overlay" over a CCSprite of mine. Basically, tint it completely white.
I can use
mySprite.color = ccc3(0,0,0);
And my sprite gets a black color overlay. However,
mySprite.color = ccc3(255,255,255);
Will, naturally, not affect my sprite. Instead, my sprite keeps its original color.
So, is there another method to achieve such? I really can't afford to make a white version of all my animations/sprites etc. | 0 |
2,075,448 | 01/15/2010 23:32:27 | 162,337 | 08/24/2009 21:50:11 | 91 | 4 | How to map 2 db columns to one property | Given a migration
class CreateTalks < ActiveRecord::Migration
def self.up
create_table :talks do |t|
t.integer :duration_hours
t.integer :duration_minutes
end
end
def self.down
drop_table :talks
end
end
and model
class Talk < ActiveRecord::Base
end
and object
class Duration
attr_accessor :hours, :minutes
end
how do I map the duration_hours and duration_minutes columns to a Duration property in Talk so that I can do
d = Talk.first.duration
hours = d.hours
minutes = d.minutes
I'm aware that in this case I could translate the hours and minutes into seconds and store these in a single column but I'm looking to understand how I could achieve this type of mapping with ActiveRecord.
| activerecord | ruby-on-rails | null | null | null | null | open | How to map 2 db columns to one property
===
Given a migration
class CreateTalks < ActiveRecord::Migration
def self.up
create_table :talks do |t|
t.integer :duration_hours
t.integer :duration_minutes
end
end
def self.down
drop_table :talks
end
end
and model
class Talk < ActiveRecord::Base
end
and object
class Duration
attr_accessor :hours, :minutes
end
how do I map the duration_hours and duration_minutes columns to a Duration property in Talk so that I can do
d = Talk.first.duration
hours = d.hours
minutes = d.minutes
I'm aware that in this case I could translate the hours and minutes into seconds and store these in a single column but I'm looking to understand how I could achieve this type of mapping with ActiveRecord.
| 0 |
11,032,448 | 06/14/2012 11:49:24 | 1,244,529 | 03/02/2012 07:22:11 | 6 | 0 | How to display my application logs in android programmatically | I want to display only my applications logs details in android programming
| android | logging | null | null | null | 06/14/2012 12:12:41 | not a real question | How to display my application logs in android programmatically
===
I want to display only my applications logs details in android programming
| 1 |
10,166,615 | 04/15/2012 22:13:59 | 1,139,368 | 01/09/2012 18:48:43 | 6 | 0 | Publish android app no company | I've developed an android application and I'd like to publish it on the android market. Moreover, I would like to add publicity using admob in order to earn some money but then I'm asked for the company and all that stuff. Do I really need to set a company to receive money. Is there any alternative? I'm really young and I see quite difficult and not worth to set a company.
Thanks in advance | android | admob | company | null | null | 04/30/2012 01:16:41 | off topic | Publish android app no company
===
I've developed an android application and I'd like to publish it on the android market. Moreover, I would like to add publicity using admob in order to earn some money but then I'm asked for the company and all that stuff. Do I really need to set a company to receive money. Is there any alternative? I'm really young and I see quite difficult and not worth to set a company.
Thanks in advance | 2 |
8,921,577 | 01/19/2012 05:43:08 | 1,112,845 | 12/23/2011 05:02:36 | 1 | 0 | Send data using POST method in php | I need to transfer data in POST method without using a html form in php.
Can you help me out with some sample code | php | post | null | null | null | 01/19/2012 06:38:40 | not a real question | Send data using POST method in php
===
I need to transfer data in POST method without using a html form in php.
Can you help me out with some sample code | 1 |
11,513,018 | 07/16/2012 21:43:05 | 1,530,124 | 07/16/2012 21:34:07 | 1 | 0 | Looking for PHP list and ACID generator | We are just starting a PHP project. We have a small team and have decided to use Doctrine (active record) for our ORM. We plan to use Zend Frameworks to provide a MVC pattern.
We are looking for any sort of code generator we can use to create first pass UI for list and ACID operations that will work with Doctine and Zend.
Does anyone have a recommendation for us? Thx JC | php | zend-framework | doctrine | null | null | 07/18/2012 14:10:53 | not constructive | Looking for PHP list and ACID generator
===
We are just starting a PHP project. We have a small team and have decided to use Doctrine (active record) for our ORM. We plan to use Zend Frameworks to provide a MVC pattern.
We are looking for any sort of code generator we can use to create first pass UI for list and ACID operations that will work with Doctine and Zend.
Does anyone have a recommendation for us? Thx JC | 4 |
11,638,888 | 07/24/2012 20:35:35 | 266,691 | 02/05/2010 00:59:29 | 397 | 25 | UrlRewriteFilter outbound to add host/subdomains to static resource paths | I need to have a filter to add subdomain paths to image and static paths from a java application.
Eg: `/foo/bar/xyz.jpg` would become `http://img1.foobar.com/foo/bar/xyz.jpg`, where the protocol should correspond to the request's protocol, and the `img1` is derived from an existing piece of code we already use to map resources to subdomains.
This has come about because we place static content on cookieless domains for content in our web-templates, but sometimes HTML is pulled in from our CMS which is maintained by a 3rd party that will just have relative URLs in the HTML.
I have looked at http://tuckey.org/urlrewrite/ but it seems like an overkill for what we need. Plus, I wasn't able to see whether you could append URLs in an outbound rule (rather than just issue a redirect - I dont want redirects, but a replacement feature on the outbound HTML). I also need to be able to dynamically generate the `img1` based on our existing code, and I'm not sure this is possible with UrlRewriteFilter. I have also seen this http://code.google.com/p/urlrewritefilter/issues/detail?id=106 but it is yet to be implemented.
Does anyone have any suggestions here? | java | url-rewriting | servlet-filters | tuckey-urlrewrite-filter | null | null | open | UrlRewriteFilter outbound to add host/subdomains to static resource paths
===
I need to have a filter to add subdomain paths to image and static paths from a java application.
Eg: `/foo/bar/xyz.jpg` would become `http://img1.foobar.com/foo/bar/xyz.jpg`, where the protocol should correspond to the request's protocol, and the `img1` is derived from an existing piece of code we already use to map resources to subdomains.
This has come about because we place static content on cookieless domains for content in our web-templates, but sometimes HTML is pulled in from our CMS which is maintained by a 3rd party that will just have relative URLs in the HTML.
I have looked at http://tuckey.org/urlrewrite/ but it seems like an overkill for what we need. Plus, I wasn't able to see whether you could append URLs in an outbound rule (rather than just issue a redirect - I dont want redirects, but a replacement feature on the outbound HTML). I also need to be able to dynamically generate the `img1` based on our existing code, and I'm not sure this is possible with UrlRewriteFilter. I have also seen this http://code.google.com/p/urlrewritefilter/issues/detail?id=106 but it is yet to be implemented.
Does anyone have any suggestions here? | 0 |
2,646,156 | 04/15/2010 14:29:25 | 221,354 | 11/30/2009 13:43:52 | 32 | 0 | ADO Execute not reading a line of SQL code? | My code is below:
var statement = "test_oracle.sql";
F = aqFile.OpenTextFile(statement, aqFile.faRead, aqFile.ctANSI);
F.Cursor = 0;
while(! F.IsEndOfFile()){
s = F.ReadLine();
oResult = Project.Variables.oConnection.Execute_(s);
The first line that "s" reads is: set serverout on size 10000
An error is returned as "ORA-00922: missing or invalid option"
Can anyone provide guidance? | javascript | ado.net | null | null | null | null | open | ADO Execute not reading a line of SQL code?
===
My code is below:
var statement = "test_oracle.sql";
F = aqFile.OpenTextFile(statement, aqFile.faRead, aqFile.ctANSI);
F.Cursor = 0;
while(! F.IsEndOfFile()){
s = F.ReadLine();
oResult = Project.Variables.oConnection.Execute_(s);
The first line that "s" reads is: set serverout on size 10000
An error is returned as "ORA-00922: missing or invalid option"
Can anyone provide guidance? | 0 |
9,137,715 | 02/04/2012 01:42:46 | 1,188,755 | 02/04/2012 01:29:56 | 1 | 0 | Deep Clone objects in C# | I was playing with different techniques for deep object cloning in C#, and finally came to pretty elegant solution that uses reflection and is applicable for non-serializable types. I am just wondering is there something wrong with it, and if anybody has comments or use case that does not work with this approach. Here is the code. Thanks for comments!
public static T Clone<T>(this T source)
{
// Get the type
Type type = source.GetType();
T clone = (T)Activator.CreateInstance(type);
// Loop through the properties
foreach (PropertyInfo pInfo in type.GetProperties())
{
pInfo.SetValue(clone, pInfo.GetValue(source, null), null);
}
// Loop through the fields
foreach (FieldInfo fInfo in type.GetFields())
{
fInfo.SetValue(clone, fInfo.GetValue(source).Clone());
}
return clone;
} | c# | object | clone | cloning | deep | 02/05/2012 04:06:51 | not a real question | Deep Clone objects in C#
===
I was playing with different techniques for deep object cloning in C#, and finally came to pretty elegant solution that uses reflection and is applicable for non-serializable types. I am just wondering is there something wrong with it, and if anybody has comments or use case that does not work with this approach. Here is the code. Thanks for comments!
public static T Clone<T>(this T source)
{
// Get the type
Type type = source.GetType();
T clone = (T)Activator.CreateInstance(type);
// Loop through the properties
foreach (PropertyInfo pInfo in type.GetProperties())
{
pInfo.SetValue(clone, pInfo.GetValue(source, null), null);
}
// Loop through the fields
foreach (FieldInfo fInfo in type.GetFields())
{
fInfo.SetValue(clone, fInfo.GetValue(source).Clone());
}
return clone;
} | 1 |
2,749,848 | 05/01/2010 12:11:50 | 246,776 | 01/08/2010 22:16:08 | 348 | 11 | How to initialize const float32x4x4_t (ARM NEON intrinsic, GCC) ? | I can initialize float32x4_t like this:
const float32x4x4_t = { 0.0f, 0.0f, 0.0f, 0.0f };
But this code makes an error **Incompatible types in initializer**:
const float32x4x4_t =
{
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
};
float32x4x4_t is 4x4 matrix built as:
typedef struct float32x4x4_t
{
float32x4_t val[4];
}
float32x4x4_t;
How can I initialize this const struct? | neon | gcc | const | struct | initialize | null | open | How to initialize const float32x4x4_t (ARM NEON intrinsic, GCC) ?
===
I can initialize float32x4_t like this:
const float32x4x4_t = { 0.0f, 0.0f, 0.0f, 0.0f };
But this code makes an error **Incompatible types in initializer**:
const float32x4x4_t =
{
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
};
float32x4x4_t is 4x4 matrix built as:
typedef struct float32x4x4_t
{
float32x4_t val[4];
}
float32x4x4_t;
How can I initialize this const struct? | 0 |
7,810,939 | 10/18/2011 16:58:39 | 620,303 | 02/16/2011 20:16:09 | 117 | 12 | What's the best computer software and hardware configuration for Visual Studio .NET 2010, cost is not an issue | like many others, I'm programming with Visual Studio 2010 many hours per day and was quite annoyed by some tasks (build, opening solution, using other software like SSMS, Crystal Report, etc.) that I think take to much time. I want "the computer and software configuration" that will be the fastest to work but I have one thing to keep in mind, I need to work with Crystal Reports 2008 so if a solution comes by using a 64 bits OS, that I am willing to, please provide informations about how to work with that version of Crystal Reports because for what I know, it is not working. Another thing, cost is not an issue.
thanks in advance | visual-studio-2010 | null | null | null | null | 10/19/2011 11:47:21 | not constructive | What's the best computer software and hardware configuration for Visual Studio .NET 2010, cost is not an issue
===
like many others, I'm programming with Visual Studio 2010 many hours per day and was quite annoyed by some tasks (build, opening solution, using other software like SSMS, Crystal Report, etc.) that I think take to much time. I want "the computer and software configuration" that will be the fastest to work but I have one thing to keep in mind, I need to work with Crystal Reports 2008 so if a solution comes by using a 64 bits OS, that I am willing to, please provide informations about how to work with that version of Crystal Reports because for what I know, it is not working. Another thing, cost is not an issue.
thanks in advance | 4 |
6,156,575 | 05/27/2011 19:00:17 | 768,472 | 05/24/2011 20:23:16 | 4 | 0 | objectAtIndex returns SIGABRT error | I have this line:
NSString *objectkey=[NSString stringWithFormat:@"%@",[line objectAtIndex:1]];
If objectAtIndex:0, it works fine. But if 1, it produces SIGABRT error at runtime.
However, I have another line to confirm that the array "line" has an object at index 1:
NSLog(@"%d",[line count]);
This returns 2 to the console.
Why would SIGABRT occur even though an index should exist there? | objective-c | null | null | null | null | null | open | objectAtIndex returns SIGABRT error
===
I have this line:
NSString *objectkey=[NSString stringWithFormat:@"%@",[line objectAtIndex:1]];
If objectAtIndex:0, it works fine. But if 1, it produces SIGABRT error at runtime.
However, I have another line to confirm that the array "line" has an object at index 1:
NSLog(@"%d",[line count]);
This returns 2 to the console.
Why would SIGABRT occur even though an index should exist there? | 0 |
4,534,343 | 12/26/2010 15:29:27 | 188,363 | 10/12/2009 10:54:13 | 92 | 0 | Redmine plugin that replaces words via regular expression? | I'm very new to Redmine/Ruby trying to achieve a simple plugin that takes the current wiki page content and matches/replaces everytime a word occurs via regular expression. How can I do this?
Thanks!
Dennis | ruby | regex | redmine | redmine-plugins | null | null | open | Redmine plugin that replaces words via regular expression?
===
I'm very new to Redmine/Ruby trying to achieve a simple plugin that takes the current wiki page content and matches/replaces everytime a word occurs via regular expression. How can I do this?
Thanks!
Dennis | 0 |
11,300,471 | 07/02/2012 20:09:09 | 1,497,061 | 07/02/2012 20:01:32 | 1 | 0 | Is it possible to convert a persons voice in a song into a voice of a celebrity singer | imagine that you have sung a song. Is it possible to convert your voice in the song to another person's voice. I hope my question is clear. I have searched google on the following topics: formant modification, voice transformation,auto tune. But I havent got any substantial answer. Please guide me. Thanks in advance.
| signal-processing | voice | null | null | null | 07/02/2012 22:08:21 | not a real question | Is it possible to convert a persons voice in a song into a voice of a celebrity singer
===
imagine that you have sung a song. Is it possible to convert your voice in the song to another person's voice. I hope my question is clear. I have searched google on the following topics: formant modification, voice transformation,auto tune. But I havent got any substantial answer. Please guide me. Thanks in advance.
| 1 |
4,264,433 | 11/24/2010 07:35:43 | 518,431 | 11/24/2010 07:14:38 | 1 | 0 | Begging with ER diagrams | why do we use ER diagrams. why is it required.??????????????????
Iam new for the ER diagrams. can anyone answer me........ | er-diagrams | null | null | null | null | 11/25/2010 01:15:25 | not a real question | Begging with ER diagrams
===
why do we use ER diagrams. why is it required.??????????????????
Iam new for the ER diagrams. can anyone answer me........ | 1 |
7,434,609 | 09/15/2011 16:55:37 | 947,311 | 09/15/2011 16:55:37 | 1 | 0 | Alternative mirrors for Android's Kernel 3.0 since kernel.org is down? | I am looking for alternative mirrors for Android's Kernel 3.0 since kernel.org is down. Thanks in advance.
Note: Android's patched kernel 3.0 not the same as Linux kernel 3.0. | android | null | null | null | null | 02/26/2012 18:35:33 | too localized | Alternative mirrors for Android's Kernel 3.0 since kernel.org is down?
===
I am looking for alternative mirrors for Android's Kernel 3.0 since kernel.org is down. Thanks in advance.
Note: Android's patched kernel 3.0 not the same as Linux kernel 3.0. | 3 |
10,872,899 | 06/03/2012 18:41:53 | 390,446 | 07/13/2010 12:46:21 | 21 | 0 | Delphi FindFirst FindNext not finding files | Using Delphi 5...
FindFirst and FindNext lists only directories when using a path like \\\192.168.0.1\Files\ instead of \\\TestServer1\Files\
if (FindFirst(SearchName+'*.*', faAnyFile, Sr) = 0) then
AddElement(sr,SearchName);
while (FindNext(sr) = 0) do
AddElement(sr,SearchName);
How can I list the files and directories when the user enters the IP address instead of the server name.
Thanks! | delphi | null | null | null | null | 06/04/2012 16:00:44 | too localized | Delphi FindFirst FindNext not finding files
===
Using Delphi 5...
FindFirst and FindNext lists only directories when using a path like \\\192.168.0.1\Files\ instead of \\\TestServer1\Files\
if (FindFirst(SearchName+'*.*', faAnyFile, Sr) = 0) then
AddElement(sr,SearchName);
while (FindNext(sr) = 0) do
AddElement(sr,SearchName);
How can I list the files and directories when the user enters the IP address instead of the server name.
Thanks! | 3 |
5,277,858 | 03/11/2011 20:17:58 | 606,547 | 02/07/2011 14:11:27 | 8 | 0 | Progress gauge in status bar, using Cody Precord's ProgressStatusBar | I am attempting to create a progress gauge in the status bar for my application, and I'm using the example in Cody Precord's wxPython 2.8 Application Development Cookbook. I've reproduced it below.
For now I simply wish to show the gauge and have it pulse when the application is busy, so I assume I need to use the Start/StopBusy() methods. Problem is, none of it seems to work, and the book doesn't provide an example of how to use the class.
In the \__init__ of my frame I create my status bar like so:
self.statbar = status.ProgressStatusBar( self )
self.SetStatusBar( self.statbar )
Then, in the function which does all the work, I have tried things like:
self.GetStatusBar().SetRange( 100 )
self.GetStatusBar().SetProgress( 0 )
self.GetStatusBar().StartBusy()
self.GetStatusBar().Run()
# work done here
self.GetStatusBar().StopBusy()
And several combinations and permutations of those commands, but nothing happens, no gauge is ever shown. The work takes several seconds, so it's not because the gauge simply disappears again too quickly for me to notice.
I can get the gauge to show up by removing the self.prog.Hide() line from Precord's \__init__ but it still doesn't pulse and simply disappears never to return once work has finished the first time.
Here's Precord's class:
class ProgressStatusBar( wx.StatusBar ):
'''Custom StatusBar with a built-in progress bar'''
def __init__( self, parent, id_=wx.ID_ANY,
style=wx.SB_FLAT, name='ProgressStatusBar' ):
super( ProgressStatusBar, self ).__init__( parent, id_, style, name )
self._changed = False
self.busy = False
self.timer = wx.Timer( self )
self.prog = wx.Gauge( self, style=wx.GA_HORIZONTAL )
self.prog.Hide()
self.SetFieldsCount( 2 )
self.SetStatusWidths( [-1, 155] )
self.Bind( wx.EVT_IDLE, lambda evt: self.__Reposition() )
self.Bind( wx.EVT_TIMER, self.OnTimer )
self.Bind( wx.EVT_SIZE, self.OnSize )
def __del__( self ):
if self.timer.IsRunning():
self.timer.Stop()
def __Reposition( self ):
'''Repositions the gauge as necessary'''
if self._changed:
lfield = self.GetFieldsCount() - 1
rect = self.GetFieldRect( lfield )
prog_pos = (rect.x + 2, rect.y + 2)
self.prog.SetPosition( prog_pos )
prog_size = (rect.width - 8, rect.height - 4)
self.prog.SetSize( prog_size )
self._changed = False
def OnSize( self, evt ):
self._changed = True
self.__Reposition()
evt.Skip()
def OnTimer( self, evt ):
if not self.prog.IsShown():
self.timer.Stop()
if self.busy:
self.prog.Pulse()
def Run( self, rate=100 ):
if not self.timer.IsRunning():
self.timer.Start( rate )
def GetProgress( self ):
return self.prog.GetValue()
def SetProgress( self, val ):
if not self.prog.IsShown():
self.ShowProgress( True )
if val == self.prog.GetRange():
self.prog.SetValue( 0 )
self.ShowProgress( False )
else:
self.prog.SetValue( val )
def SetRange( self, val ):
if val != self.prog.GetRange():
self.prog.SetRange( val )
def ShowProgress( self, show=True ):
self.__Reposition()
self.prog.Show( show )
def StartBusy( self, rate=100 ):
self.busy = True
self.__Reposition()
self.ShowProgress( True )
if not self.timer.IsRunning():
self.timer.Start( rate )
def StopBusy( self ):
self.timer.Stop()
self.ShowProgress( False )
self.prog.SetValue( 0 )
self.busy = False
def IsBusy( self ):
return self.busy | python | wxpython | null | null | null | null | open | Progress gauge in status bar, using Cody Precord's ProgressStatusBar
===
I am attempting to create a progress gauge in the status bar for my application, and I'm using the example in Cody Precord's wxPython 2.8 Application Development Cookbook. I've reproduced it below.
For now I simply wish to show the gauge and have it pulse when the application is busy, so I assume I need to use the Start/StopBusy() methods. Problem is, none of it seems to work, and the book doesn't provide an example of how to use the class.
In the \__init__ of my frame I create my status bar like so:
self.statbar = status.ProgressStatusBar( self )
self.SetStatusBar( self.statbar )
Then, in the function which does all the work, I have tried things like:
self.GetStatusBar().SetRange( 100 )
self.GetStatusBar().SetProgress( 0 )
self.GetStatusBar().StartBusy()
self.GetStatusBar().Run()
# work done here
self.GetStatusBar().StopBusy()
And several combinations and permutations of those commands, but nothing happens, no gauge is ever shown. The work takes several seconds, so it's not because the gauge simply disappears again too quickly for me to notice.
I can get the gauge to show up by removing the self.prog.Hide() line from Precord's \__init__ but it still doesn't pulse and simply disappears never to return once work has finished the first time.
Here's Precord's class:
class ProgressStatusBar( wx.StatusBar ):
'''Custom StatusBar with a built-in progress bar'''
def __init__( self, parent, id_=wx.ID_ANY,
style=wx.SB_FLAT, name='ProgressStatusBar' ):
super( ProgressStatusBar, self ).__init__( parent, id_, style, name )
self._changed = False
self.busy = False
self.timer = wx.Timer( self )
self.prog = wx.Gauge( self, style=wx.GA_HORIZONTAL )
self.prog.Hide()
self.SetFieldsCount( 2 )
self.SetStatusWidths( [-1, 155] )
self.Bind( wx.EVT_IDLE, lambda evt: self.__Reposition() )
self.Bind( wx.EVT_TIMER, self.OnTimer )
self.Bind( wx.EVT_SIZE, self.OnSize )
def __del__( self ):
if self.timer.IsRunning():
self.timer.Stop()
def __Reposition( self ):
'''Repositions the gauge as necessary'''
if self._changed:
lfield = self.GetFieldsCount() - 1
rect = self.GetFieldRect( lfield )
prog_pos = (rect.x + 2, rect.y + 2)
self.prog.SetPosition( prog_pos )
prog_size = (rect.width - 8, rect.height - 4)
self.prog.SetSize( prog_size )
self._changed = False
def OnSize( self, evt ):
self._changed = True
self.__Reposition()
evt.Skip()
def OnTimer( self, evt ):
if not self.prog.IsShown():
self.timer.Stop()
if self.busy:
self.prog.Pulse()
def Run( self, rate=100 ):
if not self.timer.IsRunning():
self.timer.Start( rate )
def GetProgress( self ):
return self.prog.GetValue()
def SetProgress( self, val ):
if not self.prog.IsShown():
self.ShowProgress( True )
if val == self.prog.GetRange():
self.prog.SetValue( 0 )
self.ShowProgress( False )
else:
self.prog.SetValue( val )
def SetRange( self, val ):
if val != self.prog.GetRange():
self.prog.SetRange( val )
def ShowProgress( self, show=True ):
self.__Reposition()
self.prog.Show( show )
def StartBusy( self, rate=100 ):
self.busy = True
self.__Reposition()
self.ShowProgress( True )
if not self.timer.IsRunning():
self.timer.Start( rate )
def StopBusy( self ):
self.timer.Stop()
self.ShowProgress( False )
self.prog.SetValue( 0 )
self.busy = False
def IsBusy( self ):
return self.busy | 0 |
2,443,956 | 03/14/2010 22:04:22 | 225,522 | 12/05/2009 19:33:39 | 12 | 3 | Changing the title of jQuery-UI dialog-box with in another dialog-box's function... | Why doesn't doesn't the second jQuery-UI dialog box title change when popped. The first dialog box I change the title of the box with using the following `.attr("title", "Confirm")` -- it change the title of the first box to 'Confirm', like it should have. Now when the second box pops up it should change the title to 'Message' since did the same thing for the second box -- `.attr("title", "Message")`. Right? But it doesnt. It keep the title from before. However, the message change like it should have. I have tested in IE8, Chrome, and FF3.6.
`<div id="dialog-confirm" title=""></div>` <-- This is the html before jQuery functions.
Javascript / jQuery
-------------------
$('#userDelete').click(function() {
$(function() {
var dialogIcon = "<span class=\"ui-icon ui-icon-alert\"></span>";
var dialogMessage = dialogIcon + "Are you sure you want to delete?";
$("#dialog-confirm").attr("title", "Confirm").html(dialogMessage).dialog({
resizable: false,
height: 125,
width: 300,
modal: true,
buttons: {
'Delete': function() {
$(this).dialog('close');
$.post('user_ajax.php', {action: 'delete',
aId: $('[name=aId]').val()
}, function(data) {
if(data.success){
var dialogIcon = "<span class=\"ui-icon ui-icon-info\"></span>";
var dialogMessage = dialogIcon + data.message;
$('#dialog-confirm').attr("title", "Message");
$('#dialog-confirm').html(dialogMessage);
$('#dialog-confirm').dialog({
resizable: false,
height: 125,
width: 300,
modal: true,
buttons: {
'Okay': function() {
$(this).dialog('close');
var url = $_httpaddress + "admin/index.php"
$(location).attr('href',url);
} // End of Okay Button Function
} //--- End of Dialog Button Script
});//--- End of Dialog Function
} else {
$_messageConsole.slideDown();
$_messageConsole.html(data.message);
}
}, 'json');
}, //--- End of Delete Button Function
'Cancel': function() {
$(this).dialog('close');
} //--- End of Cancel Button Function
} //--- End of Dialog Button Script
}); //--- End of Dialog Script
}); //--- End of Dialog Function
return false;
});
*Thank you for you assistant, if you choose to help.* | jquery | jquery-ui | html | null | null | null | open | Changing the title of jQuery-UI dialog-box with in another dialog-box's function...
===
Why doesn't doesn't the second jQuery-UI dialog box title change when popped. The first dialog box I change the title of the box with using the following `.attr("title", "Confirm")` -- it change the title of the first box to 'Confirm', like it should have. Now when the second box pops up it should change the title to 'Message' since did the same thing for the second box -- `.attr("title", "Message")`. Right? But it doesnt. It keep the title from before. However, the message change like it should have. I have tested in IE8, Chrome, and FF3.6.
`<div id="dialog-confirm" title=""></div>` <-- This is the html before jQuery functions.
Javascript / jQuery
-------------------
$('#userDelete').click(function() {
$(function() {
var dialogIcon = "<span class=\"ui-icon ui-icon-alert\"></span>";
var dialogMessage = dialogIcon + "Are you sure you want to delete?";
$("#dialog-confirm").attr("title", "Confirm").html(dialogMessage).dialog({
resizable: false,
height: 125,
width: 300,
modal: true,
buttons: {
'Delete': function() {
$(this).dialog('close');
$.post('user_ajax.php', {action: 'delete',
aId: $('[name=aId]').val()
}, function(data) {
if(data.success){
var dialogIcon = "<span class=\"ui-icon ui-icon-info\"></span>";
var dialogMessage = dialogIcon + data.message;
$('#dialog-confirm').attr("title", "Message");
$('#dialog-confirm').html(dialogMessage);
$('#dialog-confirm').dialog({
resizable: false,
height: 125,
width: 300,
modal: true,
buttons: {
'Okay': function() {
$(this).dialog('close');
var url = $_httpaddress + "admin/index.php"
$(location).attr('href',url);
} // End of Okay Button Function
} //--- End of Dialog Button Script
});//--- End of Dialog Function
} else {
$_messageConsole.slideDown();
$_messageConsole.html(data.message);
}
}, 'json');
}, //--- End of Delete Button Function
'Cancel': function() {
$(this).dialog('close');
} //--- End of Cancel Button Function
} //--- End of Dialog Button Script
}); //--- End of Dialog Script
}); //--- End of Dialog Function
return false;
});
*Thank you for you assistant, if you choose to help.* | 0 |
5,840,144 | 04/30/2011 06:54:45 | 732,147 | 04/19/2011 05:55:28 | 1 | 0 | hbase installation and reguarding table | I am new to hbase and hadoop
I am trying to display the list of tables in hbase,but it shows me following errors
hbase(main):007:0> list
error
11/04/30 09:53:48 DEBUG client.HConnectionManager$TableServers: Cache hit for row <> in tableName .META.: location server 192.168.1.60:60020, location region name .META.,,1
test
1 row(s) in 0.0110 seconds
| hbase | null | null | null | null | 05/07/2011 11:16:44 | off topic | hbase installation and reguarding table
===
I am new to hbase and hadoop
I am trying to display the list of tables in hbase,but it shows me following errors
hbase(main):007:0> list
error
11/04/30 09:53:48 DEBUG client.HConnectionManager$TableServers: Cache hit for row <> in tableName .META.: location server 192.168.1.60:60020, location region name .META.,,1
test
1 row(s) in 0.0110 seconds
| 2 |
6,328,370 | 06/13/2011 08:53:31 | 766,244 | 05/23/2011 15:07:59 | 5 | 0 | Using Xpath to get Data from XML with Namespace | I've been banging my head against a brick wall with this so would really appreciate some help. I'm using xpath for the first time and have it doing most of the things I need without any problems.
Here is an example snippet:
$urlw = "http://www.wahanda.com/rss/mobdeal.xml";
$wf = gzopen ($urlw, 'r');
$wxml = new SimpleXMLElement (fread ($wf, 1000000));
foreach($wxml->xpath ('/rss/channel/item') as $entry) {
$price = $entry->price;
echo $price . "<br/>"; }
My problem is that the feed I'm currently using has namespace declarations so the "price" node is in fact "w:price". Some of the nodes I want to use are prefixed with "w:" while others aren't. My code is therefore failing to pick up the contents of the prefixed nodes. Can someone please tell me how I work around this? From reading around I've added the following:
$wxml->registerXPathNamespace('w', 'http://www.wahanda.com/ns/1.0');
but still not sure what I need to do from here on.
Thanks a lot in advance for your help. | php | xml | xpath | namespaces | null | null | open | Using Xpath to get Data from XML with Namespace
===
I've been banging my head against a brick wall with this so would really appreciate some help. I'm using xpath for the first time and have it doing most of the things I need without any problems.
Here is an example snippet:
$urlw = "http://www.wahanda.com/rss/mobdeal.xml";
$wf = gzopen ($urlw, 'r');
$wxml = new SimpleXMLElement (fread ($wf, 1000000));
foreach($wxml->xpath ('/rss/channel/item') as $entry) {
$price = $entry->price;
echo $price . "<br/>"; }
My problem is that the feed I'm currently using has namespace declarations so the "price" node is in fact "w:price". Some of the nodes I want to use are prefixed with "w:" while others aren't. My code is therefore failing to pick up the contents of the prefixed nodes. Can someone please tell me how I work around this? From reading around I've added the following:
$wxml->registerXPathNamespace('w', 'http://www.wahanda.com/ns/1.0');
but still not sure what I need to do from here on.
Thanks a lot in advance for your help. | 0 |
657,964 | 03/18/2009 12:00:58 | 79,455 | 03/18/2009 11:54:26 | 1 | 0 | Is using NULL references OK? | I came across this code:
void f(const std::string &s);
And then a call:
f( *((std::string*)NULL) );
And I was wondering what others think of this construction, it is used to signal that function f() should use some default value (which it computes) instead of some user provided value.
I am not sure what to think of it, it looks weird but what do you think of this construction?
| c++ | null | null | null | null | null | open | Is using NULL references OK?
===
I came across this code:
void f(const std::string &s);
And then a call:
f( *((std::string*)NULL) );
And I was wondering what others think of this construction, it is used to signal that function f() should use some default value (which it computes) instead of some user provided value.
I am not sure what to think of it, it looks weird but what do you think of this construction?
| 0 |
5,999,071 | 05/14/2011 00:34:55 | 1,528,840 | 08/11/2010 13:01:02 | 73 | 4 | Most elegant/quickest way to return the result of a TSQL Query in VB.NET | I have a VB.Net program that will basically make a query to a remote MS-SQL DB using TSQL, return two columns (normally 4 rows/records), 1 is a datetime and 1 is a double. I will then need to return the average of the doubles (which is easy in VB.NET).
As I will need to run this query perhaps 1000 times an hour (programmatically with different input parameters for the query), I am looking for the most efficient way to code this up so that it will take the shortest time to run. I tried SQLDataAdapter and then using dataAdapter.Fill and sometimes it returns an empty set although the raw select query has values returned.
Is there any alternative suggestion? Speed is the key here.
Thanks in advance! | .net | sql-server | vb.net | tsql | null | null | open | Most elegant/quickest way to return the result of a TSQL Query in VB.NET
===
I have a VB.Net program that will basically make a query to a remote MS-SQL DB using TSQL, return two columns (normally 4 rows/records), 1 is a datetime and 1 is a double. I will then need to return the average of the doubles (which is easy in VB.NET).
As I will need to run this query perhaps 1000 times an hour (programmatically with different input parameters for the query), I am looking for the most efficient way to code this up so that it will take the shortest time to run. I tried SQLDataAdapter and then using dataAdapter.Fill and sometimes it returns an empty set although the raw select query has values returned.
Is there any alternative suggestion? Speed is the key here.
Thanks in advance! | 0 |
6,375,545 | 06/16/2011 16:45:25 | 801,945 | 06/16/2011 16:45:25 | 1 | 0 | In UITableViewCell how can I revert the delete confirmation mode back to normal editing mode? | Thanks for reading my question. I have a custom confirmation alert dialog box on top of the regular cell deletion confirmation for some cells, it's sort of doing a double confirmation for these cells. So, if the user clicks 'OK' to confirm in my custom confirmation dialog. It's supposed to do the actual deletion, which behaves well since the whole cell will be removed from the TableView. However, if the user clicks 'Cancel' The cell does not get deleted it remains in the table and remain in "Cancellation Confirmation Mode". This is not what I want, I want it to be reverted back to the 'Normal cell editing mode". I've searched through apple documentation, it only provides a "showingDeleteConfirmation" readonly method. It doesn't really have a way to revert this mode back to cell editing. I can do this to hack it:
[cell setEditing:NO animated:NO];
[cell setEditing:YES animated:NO];
I can't enable animation here because it will look bad it's temping to go back to non-editing mode to editing mode again. But the animation transition is not quite smooth without it. IS THERE ANY CLEANER WAY TO DO THIS?
Thanks in advanced.
| iphone | uitableview | uitableviewcell | null | null | null | open | In UITableViewCell how can I revert the delete confirmation mode back to normal editing mode?
===
Thanks for reading my question. I have a custom confirmation alert dialog box on top of the regular cell deletion confirmation for some cells, it's sort of doing a double confirmation for these cells. So, if the user clicks 'OK' to confirm in my custom confirmation dialog. It's supposed to do the actual deletion, which behaves well since the whole cell will be removed from the TableView. However, if the user clicks 'Cancel' The cell does not get deleted it remains in the table and remain in "Cancellation Confirmation Mode". This is not what I want, I want it to be reverted back to the 'Normal cell editing mode". I've searched through apple documentation, it only provides a "showingDeleteConfirmation" readonly method. It doesn't really have a way to revert this mode back to cell editing. I can do this to hack it:
[cell setEditing:NO animated:NO];
[cell setEditing:YES animated:NO];
I can't enable animation here because it will look bad it's temping to go back to non-editing mode to editing mode again. But the animation transition is not quite smooth without it. IS THERE ANY CLEANER WAY TO DO THIS?
Thanks in advanced.
| 0 |
5,558,810 | 04/05/2011 21:33:57 | 574,823 | 01/13/2011 20:10:49 | 30 | 1 | How to allow limited internet access to employees/children | I was wondering how I could set up a computer (windwos xp) or browser to allow access to only 2 or 3 websites? I know where I currently work they have 'email stations' which are computers will access only to the company homepage and email login. Please let me know any ideas you all have.
Thanks! | webbrowser-control | null | null | null | null | 04/05/2011 21:59:45 | off topic | How to allow limited internet access to employees/children
===
I was wondering how I could set up a computer (windwos xp) or browser to allow access to only 2 or 3 websites? I know where I currently work they have 'email stations' which are computers will access only to the company homepage and email login. Please let me know any ideas you all have.
Thanks! | 2 |
6,078,028 | 05/20/2011 22:04:52 | 763,439 | 05/20/2011 21:29:07 | 1 | 0 | Genetic Algorithms in Python | What are the best Genetic Algorithm modules in Python? Any recommendations, and why? | python | genetic-algorithm | genetic | null | null | 05/20/2011 22:49:50 | not constructive | Genetic Algorithms in Python
===
What are the best Genetic Algorithm modules in Python? Any recommendations, and why? | 4 |
10,528,645 | 05/10/2012 06:35:16 | 1,333,030 | 04/14/2012 08:06:30 | 35 | 2 | How to use variables to create objects on a canvas in Tkinter |
I wrote the below code to more clearly illustrate a problem I'm having in a personal project that draws fractals.
I can't figure out how to use variables to create objects on a canvas. I have tried using IntVar, lamba and functions but nothing seems to work. Does anyone have any ideas on how to do this?
from tkinter import *
class Example(Frame):
def __init__(self, parent):
Frame.__init__(self, parent)
self.parent = parent
self.initUI()
def initUI(self):
self.parent.title("Colors")
self.pack(fill=BOTH, expand=1)
canvas = Canvas(self)
A = 0
B = 0
C = 500
D = 500
canvas.create_line(A,B,C,D)
def main():
root = Tk()
ex = Example(root)
root.geometry("800x600")
root.mainloop()
if __name__ == '__main__':
main()
| python | python-3.x | tkinter | null | null | 05/15/2012 21:56:40 | too localized | How to use variables to create objects on a canvas in Tkinter
===
I wrote the below code to more clearly illustrate a problem I'm having in a personal project that draws fractals.
I can't figure out how to use variables to create objects on a canvas. I have tried using IntVar, lamba and functions but nothing seems to work. Does anyone have any ideas on how to do this?
from tkinter import *
class Example(Frame):
def __init__(self, parent):
Frame.__init__(self, parent)
self.parent = parent
self.initUI()
def initUI(self):
self.parent.title("Colors")
self.pack(fill=BOTH, expand=1)
canvas = Canvas(self)
A = 0
B = 0
C = 500
D = 500
canvas.create_line(A,B,C,D)
def main():
root = Tk()
ex = Example(root)
root.geometry("800x600")
root.mainloop()
if __name__ == '__main__':
main()
| 3 |
1,682,020 | 11/05/2009 16:57:54 | 139,696 | 07/16/2009 18:18:04 | 63 | 4 | XML to LINQ Question/s | Just before I begin heres a small overview of what I'm trying to achieve and then we'll get down to the gory details. At present I'm developing an application which will monitor a users registry for changes to specific keys which relate to user preferences. Were currently using mandatory profiles (not my choice), anyway the whole idea is to record the changes to a location where they can be writen back to a users registry next time they log on.
At the moment I have the system monitoring registry changes and firing events returning the key, value name and value that have changed. I was entering these into a list to create a single string containing all the data, then writing that list to a text file every so often. Now this has all been fine but I need to change the way data's held as breaking the strings down into key, value name and value again for the write back to registry requires too much overhead and theres also problems breaking the strings up in a uniquely identifiable fashion.
So it was suggested to me to look at XML, which I haven't used before and I've begun investigating it and it all looks simple enough, I've also used LINQ before to connect to embedded databases. What I'm currently struggling to get my head around is how LINQ is able to retrieve and manipulate the data in memory from XML, as I don't want to be constantly accessing the XML file due to a need to keep the application as quick as possible. At present all changes in the registry are cached into a List(String) then written to a text file every minute or so.
At the moment what I have is the system returning the key, value name and value in different strings, converging these into a single List(String) value, where as what I'm going to need is table or equivalent representing a key, which contains multiple value names with each value name containing a single value and finally a type (this wil be a number representing what kind of registry value this is, REG SZ, REG BINARY etc). Both in the XML file and the program it self.
Also what I don't quite get is unlike a database the tables and there schemas won't exist until the program first runs as it will create a new XML file rather than it already existing. This is due to the information being writen back to the users personal drive, so it has to be created when it first runs on the users machine.
I've tried a few links and tutorials etc but nothing has clicked just yet, so if you have an example or could maybe explain it to me a little better it would be appreciated.
Just one final bit I want to add is that my current idea for storing the data in program is to create a List of values, embedded in a List of value names and a list of value names embedded in a list of keys. Does that sound ok?
Now I know this is long, and kind of all over the place, so if someone could help it would be appreciated or if you require further information of clarification please let me know and I'll try my best.
Thanks | c# | registry | linq | linq-to-xml | xml | null | open | XML to LINQ Question/s
===
Just before I begin heres a small overview of what I'm trying to achieve and then we'll get down to the gory details. At present I'm developing an application which will monitor a users registry for changes to specific keys which relate to user preferences. Were currently using mandatory profiles (not my choice), anyway the whole idea is to record the changes to a location where they can be writen back to a users registry next time they log on.
At the moment I have the system monitoring registry changes and firing events returning the key, value name and value that have changed. I was entering these into a list to create a single string containing all the data, then writing that list to a text file every so often. Now this has all been fine but I need to change the way data's held as breaking the strings down into key, value name and value again for the write back to registry requires too much overhead and theres also problems breaking the strings up in a uniquely identifiable fashion.
So it was suggested to me to look at XML, which I haven't used before and I've begun investigating it and it all looks simple enough, I've also used LINQ before to connect to embedded databases. What I'm currently struggling to get my head around is how LINQ is able to retrieve and manipulate the data in memory from XML, as I don't want to be constantly accessing the XML file due to a need to keep the application as quick as possible. At present all changes in the registry are cached into a List(String) then written to a text file every minute or so.
At the moment what I have is the system returning the key, value name and value in different strings, converging these into a single List(String) value, where as what I'm going to need is table or equivalent representing a key, which contains multiple value names with each value name containing a single value and finally a type (this wil be a number representing what kind of registry value this is, REG SZ, REG BINARY etc). Both in the XML file and the program it self.
Also what I don't quite get is unlike a database the tables and there schemas won't exist until the program first runs as it will create a new XML file rather than it already existing. This is due to the information being writen back to the users personal drive, so it has to be created when it first runs on the users machine.
I've tried a few links and tutorials etc but nothing has clicked just yet, so if you have an example or could maybe explain it to me a little better it would be appreciated.
Just one final bit I want to add is that my current idea for storing the data in program is to create a List of values, embedded in a List of value names and a list of value names embedded in a list of keys. Does that sound ok?
Now I know this is long, and kind of all over the place, so if someone could help it would be appreciated or if you require further information of clarification please let me know and I'll try my best.
Thanks | 0 |
10,383,211 | 04/30/2012 11:49:27 | 1,266,807 | 03/13/2012 15:02:55 | 1 | 0 | SQL Server Replication Bandwidth | A SQL Server 2000 database I support has transactional replication turned on. There is a subscriber on the same network. However, this subscriber may be moving into the cloud, probably Amazon's. I have been asked to give an estimate as to how much bandwidth may be used.
I thought about getting some deltas of actual table sizes and numbers of records in each table, but this is not going to be accurate enough (e.g, all 10 columns in all 1000 records could potentially change, which would get replicated but still be hidden by this measurement).
I want to be able to say something like: "based on the last two weeks, the average amount of data going over the network to the subcriber is XXX MB".
I'm pretty sure it's a measurement of the size of the transaction log I'm after, but how to do it? | sql | server | replication | bandwidth | null | 05/01/2012 14:00:06 | off topic | SQL Server Replication Bandwidth
===
A SQL Server 2000 database I support has transactional replication turned on. There is a subscriber on the same network. However, this subscriber may be moving into the cloud, probably Amazon's. I have been asked to give an estimate as to how much bandwidth may be used.
I thought about getting some deltas of actual table sizes and numbers of records in each table, but this is not going to be accurate enough (e.g, all 10 columns in all 1000 records could potentially change, which would get replicated but still be hidden by this measurement).
I want to be able to say something like: "based on the last two weeks, the average amount of data going over the network to the subcriber is XXX MB".
I'm pretty sure it's a measurement of the size of the transaction log I'm after, but how to do it? | 2 |
196,659 | 10/13/2008 03:48:52 | 52,490 | 10/12/2008 04:07:31 | 38 | 3 | Can someone recomend example of Lazy Grid implementation in .NET 2.0+? | To improve performance/scalability of a WinForms app, I would like to defer calculation of fields that are not visible in the grid until they are needed.
Looking for ideas on how this can be done in .NET 2.0.
One idea inspired by this [post][1] is to attach a DataSource object that supports ITypedList. However ITypedList interface seems awkward for this use as it provides a column rather than row view of the data.
Cheers
[1]: http://jopinblog.wordpress.com/2007/04/30/implementing-itypedlist-for-virtual-properties/ | winforms | c# | design | lazy-loading | null | 06/08/2012 15:08:20 | not constructive | Can someone recomend example of Lazy Grid implementation in .NET 2.0+?
===
To improve performance/scalability of a WinForms app, I would like to defer calculation of fields that are not visible in the grid until they are needed.
Looking for ideas on how this can be done in .NET 2.0.
One idea inspired by this [post][1] is to attach a DataSource object that supports ITypedList. However ITypedList interface seems awkward for this use as it provides a column rather than row view of the data.
Cheers
[1]: http://jopinblog.wordpress.com/2007/04/30/implementing-itypedlist-for-virtual-properties/ | 4 |
7,447,193 | 09/16/2011 15:42:01 | 535,637 | 12/08/2010 21:42:55 | 965 | 0 | Best Practices - Is it necessary to check for certain preconditions if another method does so? | Here's an example. I saw a "ReadOnlyDictionary" class online and it had the following code:
void ICollection.CopyTo(Array array, int index)
{
ICollection collection = new List<KeyValuePair<TKey, TValue>>(this._source);
collection.CopyTo(array, index);
}
For example, should I check array for a null argument, or should I let the the CopyTo method do that for me? It just seems a bit redundent, but if best practices say to check everything in your own method, then that's what I want to do. I'm just not sure what "best practices" says to do. | c# | design | patterns | argumentnullexception | null | null | open | Best Practices - Is it necessary to check for certain preconditions if another method does so?
===
Here's an example. I saw a "ReadOnlyDictionary" class online and it had the following code:
void ICollection.CopyTo(Array array, int index)
{
ICollection collection = new List<KeyValuePair<TKey, TValue>>(this._source);
collection.CopyTo(array, index);
}
For example, should I check array for a null argument, or should I let the the CopyTo method do that for me? It just seems a bit redundent, but if best practices say to check everything in your own method, then that's what I want to do. I'm just not sure what "best practices" says to do. | 0 |
1,791,908 | 11/24/2009 18:13:19 | 205,021 | 11/06/2009 16:24:48 | 35 | 0 | open the txt file and read it and save it in database using vb6 | I have a question for you. I have a dne text file.( file will be in the test server) I need to read that file and store it in a database. In this I have to read line if that line starts with “6”. Other wise leave it.
For example in that dne file if the line starts with 6 then read that line and if second line starts with 7 then don’t read it. leave that line. And if third with 6 again read that line.
If the line starts with 6, then I don’t want to read entire line.
I want to read from position 04-11 as rtn number (length = 8)
I want to read from position 13-29 as act number (length= 17)
I want to read from position 30-39 as amt (length= 10)
I want to read from position 55-76 as name (length= 22)
After that assign that to record set and store it in database. This should do until end of file.
Can anyone provide me the code how to do that in vb6?
| vb6 | null | null | null | null | null | open | open the txt file and read it and save it in database using vb6
===
I have a question for you. I have a dne text file.( file will be in the test server) I need to read that file and store it in a database. In this I have to read line if that line starts with “6”. Other wise leave it.
For example in that dne file if the line starts with 6 then read that line and if second line starts with 7 then don’t read it. leave that line. And if third with 6 again read that line.
If the line starts with 6, then I don’t want to read entire line.
I want to read from position 04-11 as rtn number (length = 8)
I want to read from position 13-29 as act number (length= 17)
I want to read from position 30-39 as amt (length= 10)
I want to read from position 55-76 as name (length= 22)
After that assign that to record set and store it in database. This should do until end of file.
Can anyone provide me the code how to do that in vb6?
| 0 |
2,092,630 | 01/19/2010 10:07:02 | 231,964 | 12/15/2009 09:34:56 | 318 | 10 | Editing a NSMutable Array, defined in one class, from a Modal View Controller. | This is my app im working on. http://twitpic.com/yrzpo and it has a modal view that i want to let the user app things to the routines list. http://twitpic.com/yrzs3
The table view on the first page, has a data source of a NSMutableArray. On the second page, i would like to add to that array, by typing in the top text field, so when the modal view pops down, what was typed in the the field was added to the list.
Surely there is a way to do this.
Keep in mind, that my template for this app was a tab bar application.
FirstViewController.h
@interface FirstViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
NSMutableArray *routines;
}
@property (nonatomic, retain) NSMutableArray *routines;
- (IBAction)showNewEventViewController;
@end
FirstViewController.m
#import "FirstViewController.h"
#import "NewEventViewController.h"
@implementation FirstViewController
@synthesize routines;
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [routines count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
// Set up the cell...
NSString *cellValue = [routines objectAtIndex:indexPath.row];
[cell.textLabel setText:cellValue];
return cell;
}
- (IBAction)showNewEventViewController {
NewEventViewController *controller = [[NewEventViewController alloc] initWithNibName:@"NewEventView" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:controller animated:YES];
[controller release];
}
- (void)viewDidLoad {
routines = [[NSMutableArray alloc] init];
[routines addObject:@"Hello"];
[routines addObject:@"Temp"];
[routines addObject:@"Temp2"];
[routines addObject:@"Temp3"];
[routines addObject:@"Temp4"];
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[routines release];
[super dealloc];
}
@end
NewEventViewController.h
#import <UIKit/UIKit.h>
@interface NewEventViewController : UIViewController {
IBOutlet UITextField *RoutineTitle;
IBOutlet UITextField *RoutineInvolvment;
}
-(IBAction)done;
@end
NewEventViewController.m
#import "NewEventViewController.h"
#import "FirstViewController.h"
@implementation NewEventViewController
-(IBAction)done{
[RoutineTitle resignFirstResponder];
[RoutineInvolvment resignFirstResponder];
NSString *myString = RoutineTitle.text;
FirstViewController *FirstView = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
NSMutableArray *routines;
NSLog(@"Log the String: %@", myString);
FirstView.routines = routines;
[routines addObject:myString];
NSLog(@"Log Array :%@", FirstView.routines);
[self dismissModalViewControllerAnimated:YES];
}
- (void)viewDidLoad {
[super viewDidLoad];
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
@end
I urge anyone who can, please have a look at the code, and tell me what I am doing wrong. Im new to this game, ( and esp to apps that are not a single view)
I hope I have made this clear.
Thanks a lot in advance.
Sam
PS. my last few questions are all culminated in this one, for everyones ease.
Thanks.
| iphone | nsmutablearray | mvc | confusion | null | null | open | Editing a NSMutable Array, defined in one class, from a Modal View Controller.
===
This is my app im working on. http://twitpic.com/yrzpo and it has a modal view that i want to let the user app things to the routines list. http://twitpic.com/yrzs3
The table view on the first page, has a data source of a NSMutableArray. On the second page, i would like to add to that array, by typing in the top text field, so when the modal view pops down, what was typed in the the field was added to the list.
Surely there is a way to do this.
Keep in mind, that my template for this app was a tab bar application.
FirstViewController.h
@interface FirstViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
NSMutableArray *routines;
}
@property (nonatomic, retain) NSMutableArray *routines;
- (IBAction)showNewEventViewController;
@end
FirstViewController.m
#import "FirstViewController.h"
#import "NewEventViewController.h"
@implementation FirstViewController
@synthesize routines;
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [routines count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
// Set up the cell...
NSString *cellValue = [routines objectAtIndex:indexPath.row];
[cell.textLabel setText:cellValue];
return cell;
}
- (IBAction)showNewEventViewController {
NewEventViewController *controller = [[NewEventViewController alloc] initWithNibName:@"NewEventView" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:controller animated:YES];
[controller release];
}
- (void)viewDidLoad {
routines = [[NSMutableArray alloc] init];
[routines addObject:@"Hello"];
[routines addObject:@"Temp"];
[routines addObject:@"Temp2"];
[routines addObject:@"Temp3"];
[routines addObject:@"Temp4"];
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[routines release];
[super dealloc];
}
@end
NewEventViewController.h
#import <UIKit/UIKit.h>
@interface NewEventViewController : UIViewController {
IBOutlet UITextField *RoutineTitle;
IBOutlet UITextField *RoutineInvolvment;
}
-(IBAction)done;
@end
NewEventViewController.m
#import "NewEventViewController.h"
#import "FirstViewController.h"
@implementation NewEventViewController
-(IBAction)done{
[RoutineTitle resignFirstResponder];
[RoutineInvolvment resignFirstResponder];
NSString *myString = RoutineTitle.text;
FirstViewController *FirstView = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
NSMutableArray *routines;
NSLog(@"Log the String: %@", myString);
FirstView.routines = routines;
[routines addObject:myString];
NSLog(@"Log Array :%@", FirstView.routines);
[self dismissModalViewControllerAnimated:YES];
}
- (void)viewDidLoad {
[super viewDidLoad];
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
@end
I urge anyone who can, please have a look at the code, and tell me what I am doing wrong. Im new to this game, ( and esp to apps that are not a single view)
I hope I have made this clear.
Thanks a lot in advance.
Sam
PS. my last few questions are all culminated in this one, for everyones ease.
Thanks.
| 0 |
8,010,927 | 11/04/2011 14:38:21 | 1,029,797 | 11/04/2011 13:48:25 | 1 | 0 | "getaddrinfo failed..." error when accessing MySQL (5.5.17) from PHP (5.3.6-8) | I'm a total beginner, and when attempting to connect to my first real MySQL database in the manner that most tutorials use:
$connect = mysql_connect("localhost","user","pass")
I received the following error:
php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
I searched the internets but people only seemed to run into this problem when trying to access the contents of a remote file using fopen() or some such thing. I found their solutions to be inapplicable here. I assume it has something to do with an improper configuration? | php | mysql | osx | null | null | null | open | "getaddrinfo failed..." error when accessing MySQL (5.5.17) from PHP (5.3.6-8)
===
I'm a total beginner, and when attempting to connect to my first real MySQL database in the manner that most tutorials use:
$connect = mysql_connect("localhost","user","pass")
I received the following error:
php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
I searched the internets but people only seemed to run into this problem when trying to access the contents of a remote file using fopen() or some such thing. I found their solutions to be inapplicable here. I assume it has something to do with an improper configuration? | 0 |
2,574,029 | 04/04/2010 09:32:04 | 149,818 | 08/03/2009 15:16:41 | 3,589 | 272 | Why JPA injection not works on @PersistentUnit | It is continues of question ( http://stackoverflow.com/questions/2570976/struts-2-bean-is-not-created )
I'm using struts2 + toplink in my very simple web application under Tomcat.
On the page I would like use iteration tag. That is why I've declared some factory (SomeFactory) that resolves collection of entities (Entity).
Per article: http://download-uk.oracle.com/docs/cd/B32110_01/web.1013/b28221/usclient005.htm#CIHCEHHG
the only thing I need is declaration:
@PersistenceContext(unitName="name_in_persistence_xml")
public class SomeFactory
{
@PersistenceUnit(unitName="name_in_persistence_xml")
EntityManagerFactory emf;
public EntityManager getEntityManager() {
assert(emf != null); //HERE every time it is null
return emf.createEntityManager();
}
public Collection<Entity> getAll()
{
return getEntityManager().createNamedQuery("Entity.findAll").getResultList();
}
}
What is wrong? May be i miss something in web.xml? How to pre-init toplink for web application to allow injection happen? | struts | toplink | jpa | dependency-injection | null | null | open | Why JPA injection not works on @PersistentUnit
===
It is continues of question ( http://stackoverflow.com/questions/2570976/struts-2-bean-is-not-created )
I'm using struts2 + toplink in my very simple web application under Tomcat.
On the page I would like use iteration tag. That is why I've declared some factory (SomeFactory) that resolves collection of entities (Entity).
Per article: http://download-uk.oracle.com/docs/cd/B32110_01/web.1013/b28221/usclient005.htm#CIHCEHHG
the only thing I need is declaration:
@PersistenceContext(unitName="name_in_persistence_xml")
public class SomeFactory
{
@PersistenceUnit(unitName="name_in_persistence_xml")
EntityManagerFactory emf;
public EntityManager getEntityManager() {
assert(emf != null); //HERE every time it is null
return emf.createEntityManager();
}
public Collection<Entity> getAll()
{
return getEntityManager().createNamedQuery("Entity.findAll").getResultList();
}
}
What is wrong? May be i miss something in web.xml? How to pre-init toplink for web application to allow injection happen? | 0 |
7,655,060 | 10/04/2011 23:08:16 | 979,447 | 10/04/2011 22:57:54 | 1 | 0 | Apple Keyboard Efficiency and Big Oh | I don't like Apple keyboards because there is no backspace key - I have to traverse to the end of a text segment and then delete everything before it (the delete key does what the backspace key usually would).
It takes twice as long!
I wanted to make a case that the algorithm efficiency is different somehow, but I know that O (2n) and O(n) are equivalent in growth.
Is there a better way to express this than saying O(2n), where the "2" matters for such small values of n?
Thanks,
any help is appreciated! | performance | algorithm | big-o | null | null | 10/05/2011 03:25:59 | not a real question | Apple Keyboard Efficiency and Big Oh
===
I don't like Apple keyboards because there is no backspace key - I have to traverse to the end of a text segment and then delete everything before it (the delete key does what the backspace key usually would).
It takes twice as long!
I wanted to make a case that the algorithm efficiency is different somehow, but I know that O (2n) and O(n) are equivalent in growth.
Is there a better way to express this than saying O(2n), where the "2" matters for such small values of n?
Thanks,
any help is appreciated! | 1 |
1,227,764 | 08/04/2009 14:11:50 | 47,775 | 12/19/2008 13:43:01 | 472 | 35 | I need to improve my C++ skills, fast, is this realistically possible? | After taking a very hard C++ aptitude test for a blue chip company, I received a rejection email the day after. I actually thought I was a very good C++ programmer, since I have had 8 years previous experience with other languages, and about 2 years academic experience in C++ with a university software engineering course. So, the test results brought me back down to earth a touch.
I'm working on some C++ open source projects, but I feel this could take a while before it gets me up to an advanced level of C++. Since I'm a applying for C++ jobs at the moment, I'm afraid that there will be many more rejection letters to come.
To the point, is it possible to self-learn advanced C++ knowledge quickly (i.e. in a few months), or will I have to accept the hard truth that this is going to take me years?
Is there a UK-based "code camp" or something like that? Perhaps there are some industry standard C++ qualifications I can take? I'm a very hands-on learner like most people, so I'm afraid that the '[buy a book][1]' route won't work for a quick turnaround... By the way, I'm not working right now, so I'm free to spend all day learning.
[1]: http://www.amazon.co.uk/Accelerated-Practical-Programming-Example-Depth/dp/020170353X/ref=sr_1_1?ie=UTF8&qid=1249394184&sr=8-1 | c++ | self-improvement | null | null | null | 03/04/2012 05:35:02 | off topic | I need to improve my C++ skills, fast, is this realistically possible?
===
After taking a very hard C++ aptitude test for a blue chip company, I received a rejection email the day after. I actually thought I was a very good C++ programmer, since I have had 8 years previous experience with other languages, and about 2 years academic experience in C++ with a university software engineering course. So, the test results brought me back down to earth a touch.
I'm working on some C++ open source projects, but I feel this could take a while before it gets me up to an advanced level of C++. Since I'm a applying for C++ jobs at the moment, I'm afraid that there will be many more rejection letters to come.
To the point, is it possible to self-learn advanced C++ knowledge quickly (i.e. in a few months), or will I have to accept the hard truth that this is going to take me years?
Is there a UK-based "code camp" or something like that? Perhaps there are some industry standard C++ qualifications I can take? I'm a very hands-on learner like most people, so I'm afraid that the '[buy a book][1]' route won't work for a quick turnaround... By the way, I'm not working right now, so I'm free to spend all day learning.
[1]: http://www.amazon.co.uk/Accelerated-Practical-Programming-Example-Depth/dp/020170353X/ref=sr_1_1?ie=UTF8&qid=1249394184&sr=8-1 | 2 |
10,440,154 | 05/03/2012 22:26:31 | 1,260,893 | 03/10/2012 10:39:48 | 1 | 1 | Try to join two tables in Hibernate | I'm trying to join data from two tables with Hibernate Criteria. The problem comes when I try to get the relationship by the primary key:
sessionFactory.getCurrentSession().get(Class.class, id);
In my hbm, I have defined a "many-to-one" relationship and fetch="join". As I can see in the log, the select executed it is not a join, just get the parent entity.
I don't know what I'm doing wrong. is it possible to join tables this way?
Regards.
JB | hibernate | null | null | null | null | null | open | Try to join two tables in Hibernate
===
I'm trying to join data from two tables with Hibernate Criteria. The problem comes when I try to get the relationship by the primary key:
sessionFactory.getCurrentSession().get(Class.class, id);
In my hbm, I have defined a "many-to-one" relationship and fetch="join". As I can see in the log, the select executed it is not a join, just get the parent entity.
I don't know what I'm doing wrong. is it possible to join tables this way?
Regards.
JB | 0 |
10,242,144 | 04/20/2012 07:39:21 | 968,526 | 09/28/2011 06:56:34 | 2 | 0 | Adjusting size of custom dialog box in android | I am building an custom alert dialog box for my application i have written the code and its working but the only problem is its size it is not adjusting according to my content in dialog box. below is my code:
public class CustomDialogBoxActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button button = (Button)findViewById(R.id.Button01main);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
final Dialog myDialog = new Dialog(CustomDialogBoxActivity.this);
myDialog.setContentView(R.layout.dialog_sms_layout);
myDialog.setTitle("Select any one");
Button ok = (Button)myDialog.findViewById(R.id.buttonOK);
final RadioGroup radioGrp = (RadioGroup)myDialog.findViewById(R.id.radioGroupSmsDialog);
final CheckBox mob1 = (CheckBox)myDialog.findViewById(R.id.checkBoxMob1);
final CheckBox mob2 = (CheckBox)myDialog.findViewById(R.id.checkBoxMob2);
mob1.setText("9029691986");
mob2.setText("99263911766");
ok.setOnClickListener(this);
ok.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(mob1.isChecked() && mob2.isChecked()) {
if(radioGrp.getCheckedRadioButtonId() == R.id.radioSms) {
String[] phoneArray = {mob1.getText().toString(),mob2.getText().toString()};
Log.v("MOB1",mob1.getText().toString());
Log.v("MOB2",mob2.getText().toString());
Log.v("Mobile No", ""+phoneArray.toString());
sendSms("SMS Message",phoneArray);
}else if(radioGrp.getCheckedRadioButtonId() == R.id.radioBusinessCard) {
String[] phoneArray = {mob1.getText().toString(),mob2.getText().toString()};
Log.v("MOB1",mob1.getText().toString());
Log.v("MOB2",mob2.getText().toString());
Log.v("Mobile No", ""+phoneArray.toString());
sendSms("SMS Business Card",phoneArray);
}
}else if(mob1.isChecked() && !mob2.isChecked()) {
if(radioGrp.getCheckedRadioButtonId() == R.id.radioSms) {
String[] phoneArray = {mob1.getText().toString()};
Log.v("MOB1",mob1.getText().toString());
Log.v("Mobile No", ""+phoneArray.toString());
sendSms("SMS Message",phoneArray);
}else if(radioGrp.getCheckedRadioButtonId() == R.id.radioBusinessCard) {
String[] phoneArray = {mob1.getText().toString()};
Log.v("MOB1",mob1.getText().toString());
Log.v("Mobile No", ""+phoneArray.toString());
sendSms("SMS Business Card",phoneArray);
}
}else if(!mob1.isChecked() && mob2.isChecked()) {
if(radioGrp.getCheckedRadioButtonId() == R.id.radioSms) {
String[] phoneArray = {mob2.getText().toString()};
Log.v("MOB2",mob2.getText().toString());
Log.v("Mobile No", ""+phoneArray.toString());
sendSms("SMS Message",phoneArray);
}else if(radioGrp.getCheckedRadioButtonId() == R.id.radioBusinessCard) {
String[] phoneArray = {mob2.getText().toString()};
Log.v("MOB2",mob2.getText().toString());
Log.v("Mobile No", ""+phoneArray.toString());
sendSms("SMS Business Card",phoneArray);
}
}else if(!mob1.isChecked() && !mob2.isChecked()) {
Toast.makeText(getApplicationContext(), "Select atleast one number", Toast.LENGTH_SHORT).show();
}
}
});
myDialog.show();
}
});
}
public void sendSms(String message,String[] phoneNumber) {
Intent smsIntent = new Intent(Intent.ACTION_VIEW);
smsIntent.setData(Uri.parse("sms:"));
smsIntent.putExtra("sms_body", message);
smsIntent.putExtra("address", phoneNumber);
startActivity(smsIntent);
}
}
I want to adjust the dialog box size please help. thanks in advance
| android | null | null | null | null | null | open | Adjusting size of custom dialog box in android
===
I am building an custom alert dialog box for my application i have written the code and its working but the only problem is its size it is not adjusting according to my content in dialog box. below is my code:
public class CustomDialogBoxActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button button = (Button)findViewById(R.id.Button01main);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
final Dialog myDialog = new Dialog(CustomDialogBoxActivity.this);
myDialog.setContentView(R.layout.dialog_sms_layout);
myDialog.setTitle("Select any one");
Button ok = (Button)myDialog.findViewById(R.id.buttonOK);
final RadioGroup radioGrp = (RadioGroup)myDialog.findViewById(R.id.radioGroupSmsDialog);
final CheckBox mob1 = (CheckBox)myDialog.findViewById(R.id.checkBoxMob1);
final CheckBox mob2 = (CheckBox)myDialog.findViewById(R.id.checkBoxMob2);
mob1.setText("9029691986");
mob2.setText("99263911766");
ok.setOnClickListener(this);
ok.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(mob1.isChecked() && mob2.isChecked()) {
if(radioGrp.getCheckedRadioButtonId() == R.id.radioSms) {
String[] phoneArray = {mob1.getText().toString(),mob2.getText().toString()};
Log.v("MOB1",mob1.getText().toString());
Log.v("MOB2",mob2.getText().toString());
Log.v("Mobile No", ""+phoneArray.toString());
sendSms("SMS Message",phoneArray);
}else if(radioGrp.getCheckedRadioButtonId() == R.id.radioBusinessCard) {
String[] phoneArray = {mob1.getText().toString(),mob2.getText().toString()};
Log.v("MOB1",mob1.getText().toString());
Log.v("MOB2",mob2.getText().toString());
Log.v("Mobile No", ""+phoneArray.toString());
sendSms("SMS Business Card",phoneArray);
}
}else if(mob1.isChecked() && !mob2.isChecked()) {
if(radioGrp.getCheckedRadioButtonId() == R.id.radioSms) {
String[] phoneArray = {mob1.getText().toString()};
Log.v("MOB1",mob1.getText().toString());
Log.v("Mobile No", ""+phoneArray.toString());
sendSms("SMS Message",phoneArray);
}else if(radioGrp.getCheckedRadioButtonId() == R.id.radioBusinessCard) {
String[] phoneArray = {mob1.getText().toString()};
Log.v("MOB1",mob1.getText().toString());
Log.v("Mobile No", ""+phoneArray.toString());
sendSms("SMS Business Card",phoneArray);
}
}else if(!mob1.isChecked() && mob2.isChecked()) {
if(radioGrp.getCheckedRadioButtonId() == R.id.radioSms) {
String[] phoneArray = {mob2.getText().toString()};
Log.v("MOB2",mob2.getText().toString());
Log.v("Mobile No", ""+phoneArray.toString());
sendSms("SMS Message",phoneArray);
}else if(radioGrp.getCheckedRadioButtonId() == R.id.radioBusinessCard) {
String[] phoneArray = {mob2.getText().toString()};
Log.v("MOB2",mob2.getText().toString());
Log.v("Mobile No", ""+phoneArray.toString());
sendSms("SMS Business Card",phoneArray);
}
}else if(!mob1.isChecked() && !mob2.isChecked()) {
Toast.makeText(getApplicationContext(), "Select atleast one number", Toast.LENGTH_SHORT).show();
}
}
});
myDialog.show();
}
});
}
public void sendSms(String message,String[] phoneNumber) {
Intent smsIntent = new Intent(Intent.ACTION_VIEW);
smsIntent.setData(Uri.parse("sms:"));
smsIntent.putExtra("sms_body", message);
smsIntent.putExtra("address", phoneNumber);
startActivity(smsIntent);
}
}
I want to adjust the dialog box size please help. thanks in advance
| 0 |
9,117,683 | 02/02/2012 18:16:46 | 1,142,159 | 01/11/2012 01:59:33 | 1 | 0 | Internet connection sharing on bridged Linux VMs | So I have an interesting problem. I have two Linux VMs. One is running in VMWare, the other VirtualBox, and because of how they were delivered to me, it must stay that way. The two VMs must talk to one another through the host computer, so each is using the same host-only networking interface I setup on my host computer. I was able bridge these host connections into 1 using VMware Workstation's Virtual Network Editor.
My problem is I don't have internet access on either of the VMs. So I tried to use Windows 7 ICS to share internet to that host interface I setup, but the VMs never seem to have internet access. I've tried them with DHCP and correct static IPs in accordance with the host network interface. Any suggestions would be much appreciated. | vm | ics | null | null | null | 02/10/2012 12:59:00 | off topic | Internet connection sharing on bridged Linux VMs
===
So I have an interesting problem. I have two Linux VMs. One is running in VMWare, the other VirtualBox, and because of how they were delivered to me, it must stay that way. The two VMs must talk to one another through the host computer, so each is using the same host-only networking interface I setup on my host computer. I was able bridge these host connections into 1 using VMware Workstation's Virtual Network Editor.
My problem is I don't have internet access on either of the VMs. So I tried to use Windows 7 ICS to share internet to that host interface I setup, but the VMs never seem to have internet access. I've tried them with DHCP and correct static IPs in accordance with the host network interface. Any suggestions would be much appreciated. | 2 |
4,467,600 | 12/17/2010 04:06:44 | 42,340 | 12/02/2008 04:30:44 | 678 | 23 | How to launch a Android Service when the app launches? |
I'm still fresh to Android and Id think the below config works for launching my service when the app launches.
<service android:name=".PlaylistUpdaterService">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</service>
But this is not the case. What did I miss? | android | null | null | null | null | null | open | How to launch a Android Service when the app launches?
===
I'm still fresh to Android and Id think the below config works for launching my service when the app launches.
<service android:name=".PlaylistUpdaterService">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</service>
But this is not the case. What did I miss? | 0 |
9,344,086 | 02/18/2012 18:46:57 | 945,423 | 09/14/2011 19:53:40 | 249 | 2 | How I get my divs to fade out in the reverse order the showed on load | I have 3 divs fading in on page load with delays. how do I fade them out in the reverse order they came in when I press a button? I also need the animations to finish playing before the page redirects
jQuery(document).ready(function() {
$("div#helloitsdan").fadeIn(700).delay(2000);
$("div#line").delay(700).fadeIn(700);
$("div#enter_site").delay(1000).fadeIn(700);
});
$("button").click(function() {
$("div#enter_site").fadeIn(700).delay(2000);
$("div#line").delay(700).fadeIn(700);
$("div#helloitsdan").delay(1000).fadeIn(700);
});
| jquery | null | null | null | null | null | open | How I get my divs to fade out in the reverse order the showed on load
===
I have 3 divs fading in on page load with delays. how do I fade them out in the reverse order they came in when I press a button? I also need the animations to finish playing before the page redirects
jQuery(document).ready(function() {
$("div#helloitsdan").fadeIn(700).delay(2000);
$("div#line").delay(700).fadeIn(700);
$("div#enter_site").delay(1000).fadeIn(700);
});
$("button").click(function() {
$("div#enter_site").fadeIn(700).delay(2000);
$("div#line").delay(700).fadeIn(700);
$("div#helloitsdan").delay(1000).fadeIn(700);
});
| 0 |
9,361,866 | 02/20/2012 13:23:28 | 1,221,132 | 02/20/2012 13:12:43 | 1 | 0 | Wordpress admin session auth with opencart? | I have a Wordpress installation and a Opencart installation on my server. I want to integrate the admin-account of those installaltions so that I can use the login of Wordpress to also be authorised as the administrator of Opencart.
With Google I have figured out that I can make use of the wp-config.php file for this, but I have no idea of how to unset Opencart's own login feature in advantage of Wordpress. Any idea? :) | php | wordpress | opencart | null | null | null | open | Wordpress admin session auth with opencart?
===
I have a Wordpress installation and a Opencart installation on my server. I want to integrate the admin-account of those installaltions so that I can use the login of Wordpress to also be authorised as the administrator of Opencart.
With Google I have figured out that I can make use of the wp-config.php file for this, but I have no idea of how to unset Opencart's own login feature in advantage of Wordpress. Any idea? :) | 0 |
4,373,980 | 12/07/2010 06:31:00 | 533,277 | 12/07/2010 06:31:00 | 1 | 0 | scrolling button on page | HI ALL,
I HAVE LIST OF ENTRIES OF EMPLOYESS AND IT TAKES THREE TO FOUR PAGES OF SPACES IN INTERNET EXPLORER, I NEED TO SUBMIT SOME OF THE EMPLOYEE DATA TO DATABASE ,PROBLEM IS THAT THERE IS A SUBMIT BUTTON WHICH IS IN THE BOTTOM OF THE PAGE IF I SELECTED FIRST EMPLOYEE I NEED TO SCROLL THREE PAGES, SO I DECIDED TO INSERT SCROLLING BUTTON,I DONT HAVE FRAMES
CAN ANYBODY HELP ME TO DO THIS,IF ANYBODY HAVE CODE FOR THIS. | javascript-events | null | null | null | null | 12/07/2010 06:59:28 | not a real question | scrolling button on page
===
HI ALL,
I HAVE LIST OF ENTRIES OF EMPLOYESS AND IT TAKES THREE TO FOUR PAGES OF SPACES IN INTERNET EXPLORER, I NEED TO SUBMIT SOME OF THE EMPLOYEE DATA TO DATABASE ,PROBLEM IS THAT THERE IS A SUBMIT BUTTON WHICH IS IN THE BOTTOM OF THE PAGE IF I SELECTED FIRST EMPLOYEE I NEED TO SCROLL THREE PAGES, SO I DECIDED TO INSERT SCROLLING BUTTON,I DONT HAVE FRAMES
CAN ANYBODY HELP ME TO DO THIS,IF ANYBODY HAVE CODE FOR THIS. | 1 |
6,880,019 | 07/29/2011 23:27:53 | 865,843 | 07/27/2011 16:05:20 | 1 | 1 | Application for drawing png images for animation in android | I am a newbie to android .I want to make png images for animation for my app.
I need suggestions for a good application for the same . | android | png | android-animation | null | null | 07/31/2011 07:18:06 | off topic | Application for drawing png images for animation in android
===
I am a newbie to android .I want to make png images for animation for my app.
I need suggestions for a good application for the same . | 2 |
8,137,295 | 11/15/2011 13:46:03 | 1,047,530 | 11/15/2011 12:10:59 | 1 | 0 | linux mail server | I need to setup a Linux mail server on wireless router for workers to send and receive emails using our domain at the same time using outlook express, windows live or Microsoft outlook. The wireless router is the gateway to the internet and has a private IP which is 192.168.1.1. The Linux mail server has has Centos 4.8 installed and Exim configured as mail client. the ip on the network card in 192.168.100.1.
Have tested but its giving an error the server name cannot be found. how best can l solve this problem in outlook, outlook express and windows live | linux | null | null | null | null | 11/15/2011 13:49:31 | off topic | linux mail server
===
I need to setup a Linux mail server on wireless router for workers to send and receive emails using our domain at the same time using outlook express, windows live or Microsoft outlook. The wireless router is the gateway to the internet and has a private IP which is 192.168.1.1. The Linux mail server has has Centos 4.8 installed and Exim configured as mail client. the ip on the network card in 192.168.100.1.
Have tested but its giving an error the server name cannot be found. how best can l solve this problem in outlook, outlook express and windows live | 2 |
6,090,182 | 05/22/2011 19:21:39 | 764,244 | 05/21/2011 19:22:35 | 15 | 0 | program checking string of characters for capital letters | Ok, i have a function which checks if a letter is upper case and returns 'true' or 'false' value.
function isUpperCase(aCharacter)
{
return (aCharacter >= 'A') && (aCharacter <= 'Z');
}
now I would like it to check a string of characters e.g. 'AdfdfZklfksPaabcWsgdf' and after the program encounters capital letter it will execute function decryptWord on all small letters after this letter and until next capital letter and so on. Function decryptWord works fine on single words i just cant get it work on more than one ;(
function decryptMessage(cipherText, indexCharacter, plainAlphabet, cipherAlphabet)
{
for (var count = 0, count < cipherText.length; count++)
{
if (isUpperCase(cipherText.charAt(count)))
{
decryptWord(cipherText, indexCharacter, plainAlphabet, cipherAlphabet)
}
else //i dont know what to do next
}
can you tell me if i'm going in the right direction?
| javascript | null | null | null | null | null | open | program checking string of characters for capital letters
===
Ok, i have a function which checks if a letter is upper case and returns 'true' or 'false' value.
function isUpperCase(aCharacter)
{
return (aCharacter >= 'A') && (aCharacter <= 'Z');
}
now I would like it to check a string of characters e.g. 'AdfdfZklfksPaabcWsgdf' and after the program encounters capital letter it will execute function decryptWord on all small letters after this letter and until next capital letter and so on. Function decryptWord works fine on single words i just cant get it work on more than one ;(
function decryptMessage(cipherText, indexCharacter, plainAlphabet, cipherAlphabet)
{
for (var count = 0, count < cipherText.length; count++)
{
if (isUpperCase(cipherText.charAt(count)))
{
decryptWord(cipherText, indexCharacter, plainAlphabet, cipherAlphabet)
}
else //i dont know what to do next
}
can you tell me if i'm going in the right direction?
| 0 |
8,738,623 | 01/05/2012 06:42:09 | 1,101,518 | 12/16/2011 08:15:04 | 17 | 0 | Dependancy issue while openssh server installation | Am getting following error while installing openssh server in my virtualbox.
openssh-server : Depends: openssh-client (= 1:5.3p1-3ubuntu7) but 1:5.5p1-4ubuntu4 is to be installed
E: Broken packages
I am using ubuntu 10.10
root@blackbox:/# apt-get install openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
openssh-server : Depends: openssh-client (= 1:5.3p1-3ubuntu7) but 1:5.5p1-4ubuntu4 is to be installed
E: Broken packages
root@blackbox:/#
| ubuntu | openssh | null | null | null | 01/05/2012 18:59:17 | off topic | Dependancy issue while openssh server installation
===
Am getting following error while installing openssh server in my virtualbox.
openssh-server : Depends: openssh-client (= 1:5.3p1-3ubuntu7) but 1:5.5p1-4ubuntu4 is to be installed
E: Broken packages
I am using ubuntu 10.10
root@blackbox:/# apt-get install openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
openssh-server : Depends: openssh-client (= 1:5.3p1-3ubuntu7) but 1:5.5p1-4ubuntu4 is to be installed
E: Broken packages
root@blackbox:/#
| 2 |
6,007,706 | 05/15/2011 09:59:37 | 754,356 | 05/15/2011 09:50:25 | 1 | 0 | Consume ASP .NET WebService In php | I am trying to consume ASP webservice in my php script.
But i am stuck in one problem.
require_once('lib/nusoap.php');
$soapClient = new SoapClient("http://test.etech.net/PanelIntegration/PanelIntegration.asmx?wsdl");
$sh_param = array(
'Username' => 'mueksh',
'Password' => 'bisht');
and i am using **UpdateInstruction method**
$result->call("UpdateInstruction ",$sh_param);
Now in return i have get Username and Passsword not Supplied.
Can anybody tell me where i am wrong.
Thanks | php | asp.net | web-services | null | null | null | open | Consume ASP .NET WebService In php
===
I am trying to consume ASP webservice in my php script.
But i am stuck in one problem.
require_once('lib/nusoap.php');
$soapClient = new SoapClient("http://test.etech.net/PanelIntegration/PanelIntegration.asmx?wsdl");
$sh_param = array(
'Username' => 'mueksh',
'Password' => 'bisht');
and i am using **UpdateInstruction method**
$result->call("UpdateInstruction ",$sh_param);
Now in return i have get Username and Passsword not Supplied.
Can anybody tell me where i am wrong.
Thanks | 0 |
224,283 | 10/22/2008 02:31:23 | 1,075 | 08/12/2008 10:13:30 | 2,574 | 114 | jQuery datepicker - Restrict dates from server side (ASP.NET) | I have a jQuery datepicker that I want to restrict non work days - weekends, public holidays etc. I have seen examples on how to do this from the client side (javascript), but is there a way to restrict the dates from server side ASP.NET code?
I figure you could do using Page.RegisterClientScriptBlock, but was wondering is there a neater way? | jquery | datetime | asp.net | null | null | null | open | jQuery datepicker - Restrict dates from server side (ASP.NET)
===
I have a jQuery datepicker that I want to restrict non work days - weekends, public holidays etc. I have seen examples on how to do this from the client side (javascript), but is there a way to restrict the dates from server side ASP.NET code?
I figure you could do using Page.RegisterClientScriptBlock, but was wondering is there a neater way? | 0 |
10,798,478 | 05/29/2012 11:45:03 | 1,083,096 | 12/06/2011 08:17:34 | 16 | 0 | Passing variables from PHP to PERL | i have written this program to pass a variable in the embedded perl script but it gives blank output :-( why it is not working. Please fix this problem.
the php script
<?php
$var1=array ("high");
exec('C:/xampp/htdocs/WORK/hello.pl'.' '.EscapeShellArg("$var1"),$output);
echo ($output);
?>
the perl script
#!/usr/bin/perl -w
$var1=<>;
print $var1;
| php | perl | null | null | null | 05/30/2012 17:30:29 | too localized | Passing variables from PHP to PERL
===
i have written this program to pass a variable in the embedded perl script but it gives blank output :-( why it is not working. Please fix this problem.
the php script
<?php
$var1=array ("high");
exec('C:/xampp/htdocs/WORK/hello.pl'.' '.EscapeShellArg("$var1"),$output);
echo ($output);
?>
the perl script
#!/usr/bin/perl -w
$var1=<>;
print $var1;
| 3 |
8,322,952 | 11/30/2011 08:23:28 | 849,908 | 07/18/2011 11:22:46 | 1 | 0 | How to write urdu language in JTextarea in java | How to write urdu language in java?
i want some code so that i can embed it in my application | java | swing | null | null | null | 05/10/2012 08:08:38 | not a real question | How to write urdu language in JTextarea in java
===
How to write urdu language in java?
i want some code so that i can embed it in my application | 1 |
9,521,821 | 03/01/2012 18:27:54 | 1,243,392 | 03/01/2012 18:11:32 | 1 | 0 | Facebook comments, all comments end up in moderation | Somehow all comments that I put on my website end up in moderation, despite that in settings I have set up " Make every post public by default." Is someone would like to help that's url for testing: http://notiblog.pl/urz%C4%99dy-i-instytucje/urz%C4%85d-testowy | facebook | drupal | facebook-comments | null | null | 03/02/2012 23:53:53 | off topic | Facebook comments, all comments end up in moderation
===
Somehow all comments that I put on my website end up in moderation, despite that in settings I have set up " Make every post public by default." Is someone would like to help that's url for testing: http://notiblog.pl/urz%C4%99dy-i-instytucje/urz%C4%85d-testowy | 2 |
5,230,173 | 03/08/2011 08:45:17 | 521,710 | 11/26/2010 18:46:31 | 54 | 0 | how to upload Php code into sub-domain using filezilla | how to upload Php code into sub-domain using filezilla... | php | ftp | subdomain | sftp | filezilla | 03/08/2011 11:55:39 | off topic | how to upload Php code into sub-domain using filezilla
===
how to upload Php code into sub-domain using filezilla... | 2 |
11,264,139 | 06/29/2012 14:58:16 | 5,653 | 09/10/2008 16:42:43 | 1,097 | 25 | Can any JavaScript library perform as well as the Cut The Rope JavaScript implementation? | Now that the canvas tag is starting to get hardware execration by many browsers, developing casual games in HTML5 is becoming more feasible. ZeptoLabs did a great job porting Cut The Rope to HTML5 for use as a Windows 8 Metro App. You can find some of the details [here][1] but they do not get into specifics. I was wondering if anyone knew if they used a library (such as [Impact][2] or [Crafty][3]) or if you need to write all custom and optimized JavaScript code in order to get this type of performance.
Thanks!
[1]: http://www.cuttherope.ie/dev/
[2]: http://impactjs.com/
[3]: http://craftyjs.com/ | javascript | html5 | windows-8 | microsoft-metro | null | 06/29/2012 17:55:43 | not a real question | Can any JavaScript library perform as well as the Cut The Rope JavaScript implementation?
===
Now that the canvas tag is starting to get hardware execration by many browsers, developing casual games in HTML5 is becoming more feasible. ZeptoLabs did a great job porting Cut The Rope to HTML5 for use as a Windows 8 Metro App. You can find some of the details [here][1] but they do not get into specifics. I was wondering if anyone knew if they used a library (such as [Impact][2] or [Crafty][3]) or if you need to write all custom and optimized JavaScript code in order to get this type of performance.
Thanks!
[1]: http://www.cuttherope.ie/dev/
[2]: http://impactjs.com/
[3]: http://craftyjs.com/ | 1 |
8,554,176 | 12/18/2011 19:25:25 | 1,104,823 | 12/18/2011 19:15:58 | 1 | 0 | C Programming and vim | I have practically no experience with programming outside of ide's (Microsoft Visual Studio, netbeans and eclipse) and I am beginning to learn C programming. I have adequate experience with C++ and Java. I have downloaded gVim 7.3 and am looking for some guidance on how to program in C with vim. I do not even know where to type code with vim! I am completely lost and am looking for instructions to run simple command-line programs such as hello-world (to start). Also, would notepad++ be of any use?
Somebody please show me the world of C programming and Vim
| c | vim | ide | editor | null | 12/18/2011 22:37:09 | not a real question | C Programming and vim
===
I have practically no experience with programming outside of ide's (Microsoft Visual Studio, netbeans and eclipse) and I am beginning to learn C programming. I have adequate experience with C++ and Java. I have downloaded gVim 7.3 and am looking for some guidance on how to program in C with vim. I do not even know where to type code with vim! I am completely lost and am looking for instructions to run simple command-line programs such as hello-world (to start). Also, would notepad++ be of any use?
Somebody please show me the world of C programming and Vim
| 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.