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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2,848,522 | 05/17/2010 11:17:57 | 312,900 | 04/09/2010 14:53:42 | 1 | 1 | functions in C# | As in c # to create and then call the function? In C + + do so:
int func (int value)
{
value +=2;
}
But as is done in c #? | c# | function | null | null | null | 05/17/2010 11:20:50 | not a real question | functions in C#
===
As in c # to create and then call the function? In C + + do so:
int func (int value)
{
value +=2;
}
But as is done in c #? | 1 |
7,737,559 | 10/12/2011 08:59:07 | 832,998 | 07/07/2011 06:49:20 | 164 | 11 | How to force google to show my first page from a page set with pagination? | I have a website and in my website I have, for example, a list of Audi models. I saw, using google webmaster tools, that my website appears in the google search by the word audi, but the target page was the 22nd page from my result set, not the first. I need my first page to appead, not my last (or middle), but I cannot tell google that this is a parameter, because my URLs are rewritten using mod rewrite. Any ideas?
BTW, I have read in a SEO forum, that it's a bad idea to use a cannonical tag. So is it really a bad idea in my case? | google | seo | pagination | null | null | null | open | How to force google to show my first page from a page set with pagination?
===
I have a website and in my website I have, for example, a list of Audi models. I saw, using google webmaster tools, that my website appears in the google search by the word audi, but the target page was the 22nd page from my result set, not the first. I need my first page to appead, not my last (or middle), but I cannot tell google that this is a parameter, because my URLs are rewritten using mod rewrite. Any ideas?
BTW, I have read in a SEO forum, that it's a bad idea to use a cannonical tag. So is it really a bad idea in my case? | 0 |
9,953,215 | 03/31/2012 05:14:05 | 1,047,105 | 11/15/2011 08:10:11 | 6 | 0 | How do I validate whether the user is Doctor or Patient by using One Login page? | Am developing web services application, in this I got an issue that I have a Login page by using this I want to validate whether the user is Doctor or Patient. How can I validate this by using one table. Can any one help me in this with database design. And how many fields do I need for Login table.
Thanks in Advance
ram | android | web-services | null | null | null | 03/31/2012 05:38:57 | not a real question | How do I validate whether the user is Doctor or Patient by using One Login page?
===
Am developing web services application, in this I got an issue that I have a Login page by using this I want to validate whether the user is Doctor or Patient. How can I validate this by using one table. Can any one help me in this with database design. And how many fields do I need for Login table.
Thanks in Advance
ram | 1 |
9,781,946 | 03/20/2012 05:51:48 | 1,249,399 | 03/05/2012 08:42:25 | 12 | 0 | How to show resaults to users that can be editable? | I am new to java and I need your opinion on witch is the best way to show results of a database to the users of my program. The data that I will provide them will be in standard form from query in mysql and there is no need to change this query. So is no need to change the way they look, but I would like to add some functionality. To be more specific I would like them to be able to click on the path of files and open them with the default program of their operating system and to gather some boolean data from one column of this table.
Thank you in advance. | java | swing | null | null | null | 03/20/2012 14:47:24 | not a real question | How to show resaults to users that can be editable?
===
I am new to java and I need your opinion on witch is the best way to show results of a database to the users of my program. The data that I will provide them will be in standard form from query in mysql and there is no need to change this query. So is no need to change the way they look, but I would like to add some functionality. To be more specific I would like them to be able to click on the path of files and open them with the default program of their operating system and to gather some boolean data from one column of this table.
Thank you in advance. | 1 |
6,757,955 | 07/20/2011 06:39:56 | 152,308 | 08/07/2009 07:07:58 | 319 | 2 | Add permission on \d, \dp commands | I have a PostgreSQL 9.x database and user connect it via psql command. I need a add permission to \d, \dp commands. How to do it? | permissions | postgresql | null | null | null | 08/04/2011 10:15:20 | off topic | Add permission on \d, \dp commands
===
I have a PostgreSQL 9.x database and user connect it via psql command. I need a add permission to \d, \dp commands. How to do it? | 2 |
3,948,193 | 10/16/2010 08:46:28 | 445,292 | 09/11/2010 21:21:34 | 125 | 4 | tinymce: rich text mode, how does it work | I want to understand how tinymce functions.
the rich text editor contains an html document within an iframe. how are the nested DOM elements inside editable, In other word how am I able to type inside a `<div>` or a `<p>` layer when there is no textarea or input field involved (at least I dont see any)?
are the elements converted to input fields when they are active? | javascript | jquery | tinymce | text-editor | null | null | open | tinymce: rich text mode, how does it work
===
I want to understand how tinymce functions.
the rich text editor contains an html document within an iframe. how are the nested DOM elements inside editable, In other word how am I able to type inside a `<div>` or a `<p>` layer when there is no textarea or input field involved (at least I dont see any)?
are the elements converted to input fields when they are active? | 0 |
7,186,491 | 08/25/2011 07:20:31 | 833,142 | 07/07/2011 08:32:05 | 110 | 18 | C# accessing a static property of type T in a generic class | I am trying to accomplish the following scenario that the generic TestClassWrapper will be able to access static properties of classes it is made of (they will all derive from TestClass). Something like:
public class TestClass
{
public static int x = 5;
}
public class TestClassWrapper<T> where T : TestClass
{
public int test()
{
return T.x;
}
}
Gives the error: `'T' is a 'type parameter', which is not valid in the given context.`
Any suggestions? | c# | null | null | null | null | null | open | C# accessing a static property of type T in a generic class
===
I am trying to accomplish the following scenario that the generic TestClassWrapper will be able to access static properties of classes it is made of (they will all derive from TestClass). Something like:
public class TestClass
{
public static int x = 5;
}
public class TestClassWrapper<T> where T : TestClass
{
public int test()
{
return T.x;
}
}
Gives the error: `'T' is a 'type parameter', which is not valid in the given context.`
Any suggestions? | 0 |
698,320 | 03/30/2009 18:02:11 | 84,136 | 03/28/2009 23:44:54 | 26 | 4 | PHP Encoder/Encrypter | I have already googled for php source encoding software. I found some. I ask you: which is is the best one?
| php | encoder | encryption | encrypting-code | null | 09/10/2011 23:06:23 | not a real question | PHP Encoder/Encrypter
===
I have already googled for php source encoding software. I found some. I ask you: which is is the best one?
| 1 |
9,134,012 | 02/03/2012 18:59:49 | 563,819 | 01/05/2011 11:22:42 | 149 | 3 | I'm recursing through a WPF treeview itemscollection and checking various casts for null - please tell me if there's a less messy way | Here is the recursive function I currently have. Please note, it does work, but it feels to me that I've done it the long way around and there _should_ be a much easier or simpler way involving a lot less casting and checking for null:
private void RecurseAddingPVIs(ICollection<ProductVersionImplementation> outputCollection, ICollection targetCollection)
{
foreach (object item in targetCollection)
{
ProductVersionImplementation pviItem = item as ProductVersionImplementation;
if (pviItem != null)
{
outputCollection.Add(pviItem);
}
else
{
TreeViewItem treeViewItem =
item as TreeViewItem;
if (treeViewItem != null)
{
if (treeViewItem.HasItems)
{
RecurseAddingPVIs(outputCollection, treeViewItem.Items);
}
}
else
{
CollectionViewGroup collectionViewGroup = item as CollectionViewGroup;
if (collectionViewGroup != null)
{
if(collectionViewGroup.ItemCount > 0)
{
RecurseAddingPVIs(outputCollection, collectionViewGroup.Items);
}
}
}
}
}
}
Where ProductVersionImplementation is the output I want, namely a very simple class containing (you may have guessed) three string properties for storing Product, Version and Implementation.
The treeview has been modified so that multiple items can be selected simultaneously, and is set up with heirarchical data templates, with ItemsSource bound to an ICollectionView's Groups property, which is created by adding GroupDescriptions for both Product and Version. This works quite nicely as the treeview is grouped first by Product, then Version, and then specific Implementation, and my end goal is to get a simple List of which ProductVersionImplementations are selected, since the SelectedItems property is essentially a collection of TreeViewItems.
In summary and (hopefully) ignoring the extensions to TreeView, is there a better way of going through a collection which may contain various types (some of which are also collections of various sorts) without this sort of if/else checking what type it is? I just want a simple list of all the leaf nodes! | c# | wpf | collections | casting | treeview | null | open | I'm recursing through a WPF treeview itemscollection and checking various casts for null - please tell me if there's a less messy way
===
Here is the recursive function I currently have. Please note, it does work, but it feels to me that I've done it the long way around and there _should_ be a much easier or simpler way involving a lot less casting and checking for null:
private void RecurseAddingPVIs(ICollection<ProductVersionImplementation> outputCollection, ICollection targetCollection)
{
foreach (object item in targetCollection)
{
ProductVersionImplementation pviItem = item as ProductVersionImplementation;
if (pviItem != null)
{
outputCollection.Add(pviItem);
}
else
{
TreeViewItem treeViewItem =
item as TreeViewItem;
if (treeViewItem != null)
{
if (treeViewItem.HasItems)
{
RecurseAddingPVIs(outputCollection, treeViewItem.Items);
}
}
else
{
CollectionViewGroup collectionViewGroup = item as CollectionViewGroup;
if (collectionViewGroup != null)
{
if(collectionViewGroup.ItemCount > 0)
{
RecurseAddingPVIs(outputCollection, collectionViewGroup.Items);
}
}
}
}
}
}
Where ProductVersionImplementation is the output I want, namely a very simple class containing (you may have guessed) three string properties for storing Product, Version and Implementation.
The treeview has been modified so that multiple items can be selected simultaneously, and is set up with heirarchical data templates, with ItemsSource bound to an ICollectionView's Groups property, which is created by adding GroupDescriptions for both Product and Version. This works quite nicely as the treeview is grouped first by Product, then Version, and then specific Implementation, and my end goal is to get a simple List of which ProductVersionImplementations are selected, since the SelectedItems property is essentially a collection of TreeViewItems.
In summary and (hopefully) ignoring the extensions to TreeView, is there a better way of going through a collection which may contain various types (some of which are also collections of various sorts) without this sort of if/else checking what type it is? I just want a simple list of all the leaf nodes! | 0 |
7,753,858 | 10/13/2011 12:06:06 | 985,482 | 10/08/2011 15:19:54 | 6 | 0 | Learning Lisp and artificial inteligence | Hi this semester at coledge I have course fo Artificial Inteligence and we are studying Lisp problem is I dont have any functional programming backround but i do know OOP programming(Java , Javascript , PHP).
Can you gus recomend me some good book to get me up to speed on Lisp and artificial Inteligence? | lisp | null | null | null | null | 10/14/2011 21:04:01 | not constructive | Learning Lisp and artificial inteligence
===
Hi this semester at coledge I have course fo Artificial Inteligence and we are studying Lisp problem is I dont have any functional programming backround but i do know OOP programming(Java , Javascript , PHP).
Can you gus recomend me some good book to get me up to speed on Lisp and artificial Inteligence? | 4 |
4,370,530 | 12/06/2010 20:15:06 | 484,050 | 10/22/2010 09:34:09 | 8 | 0 | How to substract two Sums in Maple | I've got two sequences with variable boundaries like
<pre><code>> a:=Sum(x(i),i=n..m);
> b:=Sum(x(i),i=n-1..m+1);</code></pre>
`n` and `m` are arbitrary natural numbers and obviously `m>n`.
I want to is to substract `a` from `b` and see how `Maple` simplifies the expression to
<pre><code>> b-a;
x(n-1)+x(m+1);</code></pre>
Are there any means to do this in Maple or in another CAS? | sum | symbolic-math | maple | null | null | null | open | How to substract two Sums in Maple
===
I've got two sequences with variable boundaries like
<pre><code>> a:=Sum(x(i),i=n..m);
> b:=Sum(x(i),i=n-1..m+1);</code></pre>
`n` and `m` are arbitrary natural numbers and obviously `m>n`.
I want to is to substract `a` from `b` and see how `Maple` simplifies the expression to
<pre><code>> b-a;
x(n-1)+x(m+1);</code></pre>
Are there any means to do this in Maple or in another CAS? | 0 |
2,758,798 | 05/03/2010 14:38:23 | 40,106 | 11/23/2008 18:19:54 | 1,862 | 34 | viewDidAppear for tabbar based apps | I'd like to do something when a particular tab appears. Meaning, the user has clicked the tab view's tab button. viewDidAppear doesn't fire when this happens. How else can I hook into the tab click event? | iphone | cocoa-touch | uitabbarcontroller | uitabbar | null | null | open | viewDidAppear for tabbar based apps
===
I'd like to do something when a particular tab appears. Meaning, the user has clicked the tab view's tab button. viewDidAppear doesn't fire when this happens. How else can I hook into the tab click event? | 0 |
5,817,206 | 04/28/2011 10:30:54 | 679,884 | 03/28/2011 08:28:52 | 1 | 0 | PageMethods in asp.net - Different Browsers | I am using PageMethods in asp.net (C#)
Its working fine in IE and Opera browsers.
But its not working in FireFox and Safari.
Pls help me for this issue. Any other way to invoke pagemethods but it should work in all the browsers...
| c# | asp.net | browser | null | null | 04/28/2011 18:20:16 | not a real question | PageMethods in asp.net - Different Browsers
===
I am using PageMethods in asp.net (C#)
Its working fine in IE and Opera browsers.
But its not working in FireFox and Safari.
Pls help me for this issue. Any other way to invoke pagemethods but it should work in all the browsers...
| 1 |
9,448,852 | 02/25/2012 22:56:25 | 420,652 | 08/14/2010 21:29:09 | 81 | 5 | Spring Web App with Maven dependency - class not found during deploy | I'm having project named car-rental which contains business logic (built with maven). I use this project as dependency in other project named car-rental. It's declared as :
<dependency>
<groupId>com.car.rental</groupId>
<artifactId>car-rental-model</artifactId>
<version>1.0</version>
</dependency>
During compilation in IDE Eclipse car-rental see all classes from dependency. But after deploy to JEE container (for example Glassfish) classes aren't seen. Deployed project in server doesn't contain dependency classes.
car-rental project doesn't contains any specific build definitions:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.2</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
After maven packaging, car-rental-1.0 in target directory, contains required classes from business dependency.
Here's my car-rental project structure:
![enter image description here][2]
Probably I should somehow link business dependency in pom.xml file, but I have no idea how... Or maybe I thining wrong?
[2]: http://i.stack.imgur.com/R9G8M.png | spring | maven | web-deployment-project | pom.xml | null | null | open | Spring Web App with Maven dependency - class not found during deploy
===
I'm having project named car-rental which contains business logic (built with maven). I use this project as dependency in other project named car-rental. It's declared as :
<dependency>
<groupId>com.car.rental</groupId>
<artifactId>car-rental-model</artifactId>
<version>1.0</version>
</dependency>
During compilation in IDE Eclipse car-rental see all classes from dependency. But after deploy to JEE container (for example Glassfish) classes aren't seen. Deployed project in server doesn't contain dependency classes.
car-rental project doesn't contains any specific build definitions:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.2</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
After maven packaging, car-rental-1.0 in target directory, contains required classes from business dependency.
Here's my car-rental project structure:
![enter image description here][2]
Probably I should somehow link business dependency in pom.xml file, but I have no idea how... Or maybe I thining wrong?
[2]: http://i.stack.imgur.com/R9G8M.png | 0 |
10,627,419 | 05/16/2012 22:05:27 | 373,768 | 06/23/2010 00:46:09 | 442 | 12 | Linq: Any Intersection in Two Collections | i have to find out whether or not two collections have any intersection, the way that i did that is using LINQ's "Join" to get the Intersection of the two collections and then i use "Any". But i wonder, is there other more "elegant" way of doing this?
Thanks! | c# | linq | collections | null | null | null | open | Linq: Any Intersection in Two Collections
===
i have to find out whether or not two collections have any intersection, the way that i did that is using LINQ's "Join" to get the Intersection of the two collections and then i use "Any". But i wonder, is there other more "elegant" way of doing this?
Thanks! | 0 |
6,767,518 | 07/20/2011 19:41:51 | 558,423 | 12/30/2010 15:26:33 | 377 | 4 | What is the difference between github and gist ? | What is the purpose of gist and how is it different from regular code sharing/maintaining using github? | git | github | repository | gist | null | 07/20/2011 20:43:50 | off topic | What is the difference between github and gist ?
===
What is the purpose of gist and how is it different from regular code sharing/maintaining using github? | 2 |
7,004,990 | 08/10/2011 01:36:33 | 163,921 | 08/27/2009 02:30:30 | 5,602 | 358 | Recommend Book for WPF Custom Control Creation with Design-Time Support | Recommend Book for WPF Control Creation with Design-Time Support | wpf | books | controls | design-time | null | 10/02/2011 18:47:35 | not constructive | Recommend Book for WPF Custom Control Creation with Design-Time Support
===
Recommend Book for WPF Control Creation with Design-Time Support | 4 |
10,879,292 | 06/04/2012 09:45:00 | 1,417,495 | 05/25/2012 13:24:27 | 1 | 1 | How to disable same origin policy in Safari (Windows 7)? | I`m trying to disable same origin policy in Safari (5.1.7.) on W7 station.
I`m doing phonegap application + jquery mobile + usage of rest services (drupal services 3.x module). I don`t have access to OSX now and need to test it without "Iphone simulator".
1. Is it possible to do tests with usage of W7 / Safari with disabled same-origin-policy?
2. Do I need to use file:// protocol to test it with Safari?
Thank you and greetings. | drupal | rest | phonegap | safari | same-origin-policy | null | open | How to disable same origin policy in Safari (Windows 7)?
===
I`m trying to disable same origin policy in Safari (5.1.7.) on W7 station.
I`m doing phonegap application + jquery mobile + usage of rest services (drupal services 3.x module). I don`t have access to OSX now and need to test it without "Iphone simulator".
1. Is it possible to do tests with usage of W7 / Safari with disabled same-origin-policy?
2. Do I need to use file:// protocol to test it with Safari?
Thank you and greetings. | 0 |
6,954,884 | 08/05/2011 10:26:06 | 880,312 | 08/05/2011 09:55:34 | 1 | 0 | Is it possiable to retrive siginal from a sleeped windows PC to a USB device? | I want to design a USB device that can retrive siginal(like IM message) from a sleeped windows 7 PC. Is it possiable? If not, how about from a locked windows 7 PC?
Thanks in advance. | wpf | windows | winforms | application | usb | 08/05/2011 15:55:07 | not a real question | Is it possiable to retrive siginal from a sleeped windows PC to a USB device?
===
I want to design a USB device that can retrive siginal(like IM message) from a sleeped windows 7 PC. Is it possiable? If not, how about from a locked windows 7 PC?
Thanks in advance. | 1 |
10,845,178 | 06/01/2012 06:02:25 | 1,421,190 | 05/28/2012 07:34:13 | 1 | 0 | Twitter Integration with IOS application for posting. | Hello guys i want to put tweeter integration with my one of app for iphone and ipad both.
I want to make that User can Past or Tweet from my app to tweeter wall. with that my application icon and link of my website and also for itunes connect accounts for iphone app is also posted in his tweeter wall. so which SDK i will used and how i can tweet give me nice tutorial from where i can learn something.
Thanks | ios5 | integration | null | null | null | 06/02/2012 06:31:22 | not constructive | Twitter Integration with IOS application for posting.
===
Hello guys i want to put tweeter integration with my one of app for iphone and ipad both.
I want to make that User can Past or Tweet from my app to tweeter wall. with that my application icon and link of my website and also for itunes connect accounts for iphone app is also posted in his tweeter wall. so which SDK i will used and how i can tweet give me nice tutorial from where i can learn something.
Thanks | 4 |
2,338,996 | 02/26/2010 01:45:53 | 118,175 | 06/05/2009 17:52:19 | 692 | 18 | How to approach multi-model form in rails | I have a complex form in Ruby on Rails 2.3.5, here's the structure for it:
Artist
- Name
- Albums
-Songs
- Photos
Each artist can albums and several photos. For each album, there are several songs.
I want to create a 3 step process.
- Create Artist
- Create Album (will have option to create multiple songs)
- Create Photos
I want to set it up in a wizard-like way.
My question is actually pretty general - how would you go about (organizationally speaking) creating forms for the models and controllers for such a project?
Currently, I have a model called Artist, a model called Albums and a model called Photos. Artists has many albums and photos. Under which view would I place the form?
Right now, the way it is looking I go to:
artists/new - create the artist, somehow pass artist id to album,
move to albums as albums/new, keep passing that artist id to photos,
photos/new to create photos and then finish -> back to artists/show.
Ideally, I'd like to have something like artists/new/1 to create the artists
artists/new/2 to create the albums and artists/new/3 to create the photos.
How would I go about doing that? Other than routing the pages to where I want them, is that the correct way of organizing things?
Thank you!
| ruby-on-rails | null | null | null | null | null | open | How to approach multi-model form in rails
===
I have a complex form in Ruby on Rails 2.3.5, here's the structure for it:
Artist
- Name
- Albums
-Songs
- Photos
Each artist can albums and several photos. For each album, there are several songs.
I want to create a 3 step process.
- Create Artist
- Create Album (will have option to create multiple songs)
- Create Photos
I want to set it up in a wizard-like way.
My question is actually pretty general - how would you go about (organizationally speaking) creating forms for the models and controllers for such a project?
Currently, I have a model called Artist, a model called Albums and a model called Photos. Artists has many albums and photos. Under which view would I place the form?
Right now, the way it is looking I go to:
artists/new - create the artist, somehow pass artist id to album,
move to albums as albums/new, keep passing that artist id to photos,
photos/new to create photos and then finish -> back to artists/show.
Ideally, I'd like to have something like artists/new/1 to create the artists
artists/new/2 to create the albums and artists/new/3 to create the photos.
How would I go about doing that? Other than routing the pages to where I want them, is that the correct way of organizing things?
Thank you!
| 0 |
10,297,361 | 04/24/2012 11:57:07 | 749,515 | 04/29/2011 12:19:47 | 131 | 1 | Can boost::thread be terminated before its owner class (boost::threadpool or boost::thread_group) started to destroy? | I have unexpected boost::thread termination during program exit.
1. Threads are created using boost::threadpool.
2. boost::threadpool object is not static and its destructor does not executing while the situation happened.
How threads could terminate otherwise? | c++ | boost-thread | null | null | null | 04/25/2012 12:01:41 | not a real question | Can boost::thread be terminated before its owner class (boost::threadpool or boost::thread_group) started to destroy?
===
I have unexpected boost::thread termination during program exit.
1. Threads are created using boost::threadpool.
2. boost::threadpool object is not static and its destructor does not executing while the situation happened.
How threads could terminate otherwise? | 1 |
11,280,445 | 07/01/2012 08:04:29 | 302,274 | 08/21/2009 14:50:04 | 333 | 2 | How to save database results to CSV in Ruby | I am trying to take the results of a query to a db and save them to a csv file. Here is my current Ruby script.
#! /usr/bin/ruby
require 'rubygems'
require 'mysql'
require 'date'
# need mysql queries here / use mysql2 calls
db_con = Mysql.new("localhost", "root", "", "msd")
date_results = db_con.query("SELECT CONCAT(CONVERT(date_format(dd.date, '%b-%e'),char),'\\n') AS date
FROM msd.date_dim dd LEFT OUTER JOIN msd.results cs
ON dd.id = cs.date_id
GROUP BY
dd.date")
# create new xml file and insert header
open('test_trend.xml', 'w') do |f|
date_results.each_hash do |f|
f.puts "#{f['date']}"
end
end
I get the following error. Line 23 is the date_results.each_hash line.
so_test.rb:24:in `block (2 levels) in <main>': private method `puts' called for {"date"=>"Jun-12\n"}:Hash (NoMethodError)
from /Users/pierce/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.9/lib/mysql.rb:686:in `call'
from /Users/pierce/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.9/lib/mysql.rb:686:in `each_hash'
from so_test.rb:23:in `block in <main>'
from so_test.rb:22:in `open'
from so_test.rb:22:in `<main>'
Any advice is appreciated. Thanks. | mysql | ruby | null | null | null | null | open | How to save database results to CSV in Ruby
===
I am trying to take the results of a query to a db and save them to a csv file. Here is my current Ruby script.
#! /usr/bin/ruby
require 'rubygems'
require 'mysql'
require 'date'
# need mysql queries here / use mysql2 calls
db_con = Mysql.new("localhost", "root", "", "msd")
date_results = db_con.query("SELECT CONCAT(CONVERT(date_format(dd.date, '%b-%e'),char),'\\n') AS date
FROM msd.date_dim dd LEFT OUTER JOIN msd.results cs
ON dd.id = cs.date_id
GROUP BY
dd.date")
# create new xml file and insert header
open('test_trend.xml', 'w') do |f|
date_results.each_hash do |f|
f.puts "#{f['date']}"
end
end
I get the following error. Line 23 is the date_results.each_hash line.
so_test.rb:24:in `block (2 levels) in <main>': private method `puts' called for {"date"=>"Jun-12\n"}:Hash (NoMethodError)
from /Users/pierce/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.9/lib/mysql.rb:686:in `call'
from /Users/pierce/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.9/lib/mysql.rb:686:in `each_hash'
from so_test.rb:23:in `block in <main>'
from so_test.rb:22:in `open'
from so_test.rb:22:in `<main>'
Any advice is appreciated. Thanks. | 0 |
8,054,152 | 11/08/2011 16:55:47 | 1,025,915 | 11/02/2011 15:08:20 | 47 | 4 | SSRS BIDS 2008 R2 pie chart data labels overlapping | ![enter image description here][1]
[1]: http://i.stack.imgur.com/HixWI.jpg
As seen in image, the data labels are overlapping and making the data difficult to read. Anybody know how to sort this? | sql-server | sql-server-2008 | reporting-services | bids | pie-chart | null | open | SSRS BIDS 2008 R2 pie chart data labels overlapping
===
![enter image description here][1]
[1]: http://i.stack.imgur.com/HixWI.jpg
As seen in image, the data labels are overlapping and making the data difficult to read. Anybody know how to sort this? | 0 |
6,590,920 | 07/06/2011 02:24:12 | 826,450 | 07/02/2011 23:04:34 | 4 | 0 | Help me correct my loop function on optim calculation: its giving indentical results for all the runs | May you help me correct my loop function. It is giving me indentical results for all the runs.
My code and results and data I am getting are below(in order).
Thank you in advance
Edward
a=read.table("D:/hope.txt",header=T)
attach(a)
a
#code
#likilihood function
llik = function(x)
{
al_j=x[1]; au_j=x[2]; sigma_j=x[3]; b_j=x[4]
sum(na.rm=T,
ifelse(a$R_j< 0, -log(1/(2*pi*(sigma_j^2)))-
(1/(2*(sigma_j^2))*(a$R_j+al_j-b_j*a$R_m))^2,
ifelse(a$R_j>0 , -log(1/(2*pi*(sigma_j^2)))-
(1/(2*(sigma_j^2))*(a$R_j+au_j-b_j*a$R_m))^2,
-log(ifelse (( pnorm (au_j, mean=b_j * a$R_m,
sd= sqrt(sigma_j^2))-
pnorm(al_j, mean=b_j * a$R_m, sd=sqrt (sigma_j^2) )) > 0,
(pnorm (au_j,mean=b_j * a$R_m, sd= sqrt(sigma_j^2))-
pnorm(al_j, mean=b_j * a$R_m, sd= sqrt(sigma_j^2) )),
1)) ))
)
}
start.par = c(-0.01,0.01,0.1,1)
#looping now
runs=133/20+1 #total data points divided by number od days in each quater+1
out <- matrix(NA, nrow = runs, ncol = 4,
dimnames = list(paste("Quater:", 1:runs, sep = ''),
c("al_j", "au_j", "sigma_j", "b_j")))
for (i in 1:runs) {
a[seq(20 * (i - 1) +1, 20 * i), ]
out[i, ] <- optim(llik, par = start.par, method = "Nelder-Mead")[[1]]
}
out
#results I am getting
> out
al_j au_j sigma_j b_j
Quater:1 0.04001525 0.06006251 -7.171336e-25 1.049982
Quater:2 0.04001525 0.06006251 -7.171336e-25 1.049982
Quater:3 0.04001525 0.06006251 -7.171336e-25 1.049982
Quater:4 0.04001525 0.06006251 -7.171336e-25 1.049982
Quater:5 0.04001525 0.06006251 -7.171336e-25 1.049982
Quater:6 0.04001525 0.06006251 -7.171336e-25 1.049982
Quater:7 0.04001525 0.06006251 -7.171336e-25 1.049982
>
#data
> a=read.table("D:/hope.txt",header=T)
> attach(a)
> a
R_j R_m
1 0.004522613 0.005969628
2 0.000500250 -0.003733120
3 0.000000000 -0.014917236
4 0.000000000 -0.014645022
5 0.020000000 0.017211165
6 -0.007352941 0.011623616
7 0.034567901 0.007440959
8 -0.000954654 0.008891883
9 -0.003822265 0.003425583
10 -0.011990408 0.000173465
11 0.017961165 -0.004791331
12 -0.018121125 -0.004075254
13 -0.003885381 0.002425306
14 -0.004388103 0.003214301
15 0.003917728 0.001167475
16 NA 0.000000000
17 NA -0.002288068
18 0.016582915 0.003207290
19 0.005931784 0.010440079
20 0.000000000 -0.000150949
21 -0.002457002 0.002131697
22 -0.002463054 -0.002809137
23 NA 0.000000000
24 NA -0.000772543
25 0.004926108 0.003470228
26 0.000000000 0.002697099
27 0.009803922 -0.002829863
28 -0.004854369 0.005891237
29 -0.016585366 0.003692262
30 0.004464286 -0.012855486
31 0.012345679 0.003291105
32 -0.015609756 -0.005796509
33 -0.013875124 -0.007241842
34 0.000000000 0.014627195
35 0.005025126 0.010005239
36 -0.001500000 0.004562562
37 -0.004506760 0.000885936
38 0.002515091 -0.010558751
39 -0.017561465 0.007535539
40 0.006128703 -0.006018786
41 -0.030456853 -0.016271600
42 0.010471204 0.009513103
43 0.002590674 -0.008430302
44 -0.010335917 -0.006665713
45 -0.002088773 0.009748669
46 -0.002093145 0.005421514
47 -0.006292606 -0.018528844
48 -0.034300792 -0.004574700
49 0.002732240 0.013994506
50 0.008174387 0.020398478
51 -0.010270270 0.009456836
52 0.006553796 0.003283443
53 -0.014107434 -0.003108880
54 0.028068244 -0.000346644
55 0.017130621 -0.003394446
56 -0.013157895 -0.008203795
57 0.013333333 0.016811439
58 0.005263158 0.004240110
59 0.002617801 -0.001020727
60 0.007832898 -0.008534713
61 0.018134715 -0.001684355
62 0.012722646 -0.006383295
63 0.017587940 0.009000422
64 -0.010370370 -0.011048668
65 -0.024950100 -0.015784948
66 -0.010747185 -0.007064998
67 0.000517331 0.008172464
68 0.037745605 0.009588436
69 -0.033881415 -0.006859178
70 0.010314595 -0.002422410
71 0.007146503 0.011792104
72 0.013684744 -0.000403708
73 -0.010000000 -0.001201408
74 0.000000000 -0.014576350
75 -0.006060606 -0.000221507
76 -0.004573171 -0.028957237
77 0.005615110 0.008897393
78 -0.024873096 -0.009472038
79 -0.013014055 -0.022171680
80 -0.006329114 0.013859068
81 0.007961783 0.003467221
82 0.000526593 -0.001349999
83 NA 0.000000000
84 NA 0.006233644
85 0.026315789 0.011249077
86 0.007692308 0.013843741
87 -0.007633588 -0.001636770
88 0.005128205 -0.006924002
89 0.010204082 0.010864286
90 -0.002020202 0.017548390
91 -0.030364372 -0.002185929
92 -0.003653445 0.005628483
93 -0.004714510 0.001619561
94 0.000000000 0.005952629
95 0.015789474 0.007864028
96 -0.036269430 -0.007729996
97 0.002688172 0.005301954
98 0.000000000 0.000248733
99 -0.008042895 -0.017509370
100 0.000000000 0.003533513
101 0.013513514 0.001994820
102 -0.013333333 -0.005881549
103 -0.035135135 -0.026034469
104 -0.047619048 0.014286383
105 0.026470588 0.021648984
106 0.013753582 0.004075471
107 NA 0.000000000
108 NA 0.000000000
109 NA 0.000284456
110 NA 0.000000000
111 NA -0.000251009
112 0.011797753 0.005397436
113 NA 0.000000000
114 NA -0.015543806
115 -0.002238388 -0.014514399
116 -0.006730230 -0.008616728
117 0.005081875 0.009394234
118 -0.002808989 -0.008439770
119 -0.004507042 0.015051671
120 0.010186757 -0.001066212
121 0.000000000 -0.011529000
122 -0.007843137 0.008777902
123 -0.003387916 0.006135182
124 -0.002832861 -0.009705806
125 NA 0.000000000
126 NA 0.002355866
127 -0.004524887 -0.003909906
128 -0.008522727 -0.014140975
129 0.009169054 0.012331338
130 0.013628620 0.001970940
131 0.005602241 0.005866591
132 -0.011142061 0.012642233
133 0.012957746 0.000169835
| r | optimization | loops | statistics | finance | 07/06/2011 13:44:32 | too localized | Help me correct my loop function on optim calculation: its giving indentical results for all the runs
===
May you help me correct my loop function. It is giving me indentical results for all the runs.
My code and results and data I am getting are below(in order).
Thank you in advance
Edward
a=read.table("D:/hope.txt",header=T)
attach(a)
a
#code
#likilihood function
llik = function(x)
{
al_j=x[1]; au_j=x[2]; sigma_j=x[3]; b_j=x[4]
sum(na.rm=T,
ifelse(a$R_j< 0, -log(1/(2*pi*(sigma_j^2)))-
(1/(2*(sigma_j^2))*(a$R_j+al_j-b_j*a$R_m))^2,
ifelse(a$R_j>0 , -log(1/(2*pi*(sigma_j^2)))-
(1/(2*(sigma_j^2))*(a$R_j+au_j-b_j*a$R_m))^2,
-log(ifelse (( pnorm (au_j, mean=b_j * a$R_m,
sd= sqrt(sigma_j^2))-
pnorm(al_j, mean=b_j * a$R_m, sd=sqrt (sigma_j^2) )) > 0,
(pnorm (au_j,mean=b_j * a$R_m, sd= sqrt(sigma_j^2))-
pnorm(al_j, mean=b_j * a$R_m, sd= sqrt(sigma_j^2) )),
1)) ))
)
}
start.par = c(-0.01,0.01,0.1,1)
#looping now
runs=133/20+1 #total data points divided by number od days in each quater+1
out <- matrix(NA, nrow = runs, ncol = 4,
dimnames = list(paste("Quater:", 1:runs, sep = ''),
c("al_j", "au_j", "sigma_j", "b_j")))
for (i in 1:runs) {
a[seq(20 * (i - 1) +1, 20 * i), ]
out[i, ] <- optim(llik, par = start.par, method = "Nelder-Mead")[[1]]
}
out
#results I am getting
> out
al_j au_j sigma_j b_j
Quater:1 0.04001525 0.06006251 -7.171336e-25 1.049982
Quater:2 0.04001525 0.06006251 -7.171336e-25 1.049982
Quater:3 0.04001525 0.06006251 -7.171336e-25 1.049982
Quater:4 0.04001525 0.06006251 -7.171336e-25 1.049982
Quater:5 0.04001525 0.06006251 -7.171336e-25 1.049982
Quater:6 0.04001525 0.06006251 -7.171336e-25 1.049982
Quater:7 0.04001525 0.06006251 -7.171336e-25 1.049982
>
#data
> a=read.table("D:/hope.txt",header=T)
> attach(a)
> a
R_j R_m
1 0.004522613 0.005969628
2 0.000500250 -0.003733120
3 0.000000000 -0.014917236
4 0.000000000 -0.014645022
5 0.020000000 0.017211165
6 -0.007352941 0.011623616
7 0.034567901 0.007440959
8 -0.000954654 0.008891883
9 -0.003822265 0.003425583
10 -0.011990408 0.000173465
11 0.017961165 -0.004791331
12 -0.018121125 -0.004075254
13 -0.003885381 0.002425306
14 -0.004388103 0.003214301
15 0.003917728 0.001167475
16 NA 0.000000000
17 NA -0.002288068
18 0.016582915 0.003207290
19 0.005931784 0.010440079
20 0.000000000 -0.000150949
21 -0.002457002 0.002131697
22 -0.002463054 -0.002809137
23 NA 0.000000000
24 NA -0.000772543
25 0.004926108 0.003470228
26 0.000000000 0.002697099
27 0.009803922 -0.002829863
28 -0.004854369 0.005891237
29 -0.016585366 0.003692262
30 0.004464286 -0.012855486
31 0.012345679 0.003291105
32 -0.015609756 -0.005796509
33 -0.013875124 -0.007241842
34 0.000000000 0.014627195
35 0.005025126 0.010005239
36 -0.001500000 0.004562562
37 -0.004506760 0.000885936
38 0.002515091 -0.010558751
39 -0.017561465 0.007535539
40 0.006128703 -0.006018786
41 -0.030456853 -0.016271600
42 0.010471204 0.009513103
43 0.002590674 -0.008430302
44 -0.010335917 -0.006665713
45 -0.002088773 0.009748669
46 -0.002093145 0.005421514
47 -0.006292606 -0.018528844
48 -0.034300792 -0.004574700
49 0.002732240 0.013994506
50 0.008174387 0.020398478
51 -0.010270270 0.009456836
52 0.006553796 0.003283443
53 -0.014107434 -0.003108880
54 0.028068244 -0.000346644
55 0.017130621 -0.003394446
56 -0.013157895 -0.008203795
57 0.013333333 0.016811439
58 0.005263158 0.004240110
59 0.002617801 -0.001020727
60 0.007832898 -0.008534713
61 0.018134715 -0.001684355
62 0.012722646 -0.006383295
63 0.017587940 0.009000422
64 -0.010370370 -0.011048668
65 -0.024950100 -0.015784948
66 -0.010747185 -0.007064998
67 0.000517331 0.008172464
68 0.037745605 0.009588436
69 -0.033881415 -0.006859178
70 0.010314595 -0.002422410
71 0.007146503 0.011792104
72 0.013684744 -0.000403708
73 -0.010000000 -0.001201408
74 0.000000000 -0.014576350
75 -0.006060606 -0.000221507
76 -0.004573171 -0.028957237
77 0.005615110 0.008897393
78 -0.024873096 -0.009472038
79 -0.013014055 -0.022171680
80 -0.006329114 0.013859068
81 0.007961783 0.003467221
82 0.000526593 -0.001349999
83 NA 0.000000000
84 NA 0.006233644
85 0.026315789 0.011249077
86 0.007692308 0.013843741
87 -0.007633588 -0.001636770
88 0.005128205 -0.006924002
89 0.010204082 0.010864286
90 -0.002020202 0.017548390
91 -0.030364372 -0.002185929
92 -0.003653445 0.005628483
93 -0.004714510 0.001619561
94 0.000000000 0.005952629
95 0.015789474 0.007864028
96 -0.036269430 -0.007729996
97 0.002688172 0.005301954
98 0.000000000 0.000248733
99 -0.008042895 -0.017509370
100 0.000000000 0.003533513
101 0.013513514 0.001994820
102 -0.013333333 -0.005881549
103 -0.035135135 -0.026034469
104 -0.047619048 0.014286383
105 0.026470588 0.021648984
106 0.013753582 0.004075471
107 NA 0.000000000
108 NA 0.000000000
109 NA 0.000284456
110 NA 0.000000000
111 NA -0.000251009
112 0.011797753 0.005397436
113 NA 0.000000000
114 NA -0.015543806
115 -0.002238388 -0.014514399
116 -0.006730230 -0.008616728
117 0.005081875 0.009394234
118 -0.002808989 -0.008439770
119 -0.004507042 0.015051671
120 0.010186757 -0.001066212
121 0.000000000 -0.011529000
122 -0.007843137 0.008777902
123 -0.003387916 0.006135182
124 -0.002832861 -0.009705806
125 NA 0.000000000
126 NA 0.002355866
127 -0.004524887 -0.003909906
128 -0.008522727 -0.014140975
129 0.009169054 0.012331338
130 0.013628620 0.001970940
131 0.005602241 0.005866591
132 -0.011142061 0.012642233
133 0.012957746 0.000169835
| 3 |
8,280,697 | 11/26/2011 18:42:52 | 748,527 | 05/11/2011 11:19:02 | 66 | 2 | AutoMySQLBackup For WIndow? | >Hi how to automatically backup mysql after regular interval in windows? | mysql | database | database-backups | null | null | 11/27/2011 14:13:32 | off topic | AutoMySQLBackup For WIndow?
===
>Hi how to automatically backup mysql after regular interval in windows? | 2 |
8,307,884 | 11/29/2011 08:39:11 | 908,088 | 08/23/2011 16:04:29 | 30 | 0 | Alternatives to Highcharts for datasets with 10k data points? | We need to generate similar to
http://zopyx.com/tmp/chart.png
Here are the requirements:
- 24*365 data points for the line graph in the upper part of the chart (one value per hour/day for year)
- 12 data points for each block below (one per month)
So each vertical block (one per month) is associated with a set of 24*30 (or 31) datapoints.
I tried to implement the chart using Highcharts but it seems to have serious issue with large data sets (Firefox show an alert about a long running script).
Are there any alternatives to Highcharts that can deal with this usecase? Interactivity is a must (users should be able to zoom-in/out )
| javascript | charts | highcharts | null | null | 01/12/2012 16:00:30 | not constructive | Alternatives to Highcharts for datasets with 10k data points?
===
We need to generate similar to
http://zopyx.com/tmp/chart.png
Here are the requirements:
- 24*365 data points for the line graph in the upper part of the chart (one value per hour/day for year)
- 12 data points for each block below (one per month)
So each vertical block (one per month) is associated with a set of 24*30 (or 31) datapoints.
I tried to implement the chart using Highcharts but it seems to have serious issue with large data sets (Firefox show an alert about a long running script).
Are there any alternatives to Highcharts that can deal with this usecase? Interactivity is a must (users should be able to zoom-in/out )
| 4 |
7,338,478 | 09/07/2011 18:07:07 | 872,578 | 08/01/2011 10:04:30 | 24 | 1 | Opinion on TMS and DEVEXPRESS component | i want know your opinion about TMS and DEVEXPRESS component; when is prefer use TMS and when DEVEXPRESS component? Pro/Contro of this? I want buy one of these two, and not know that choose, what is better and why? Thanks very much. | delphi | devexpress | delphi-xe2 | tms | null | 09/07/2011 18:39:19 | not constructive | Opinion on TMS and DEVEXPRESS component
===
i want know your opinion about TMS and DEVEXPRESS component; when is prefer use TMS and when DEVEXPRESS component? Pro/Contro of this? I want buy one of these two, and not know that choose, what is better and why? Thanks very much. | 4 |
1,874,980 | 12/09/2009 16:15:00 | 228,067 | 12/09/2009 15:36:41 | 1 | 0 | How to correctly uninstall Ruby 1.9.1 | Hi:) I have manually set Ruby 1.9.1. I have installed it via
./configure --prefix=/opt
make
make install
The target 'uninstall' does not exist in generated Makefile ...
How to do uninstallation **correctly?**
PS: I also believe that it is necessary to remove all the gems.
For this I use
#!/bin/sh
gem list --local | grep [^\*] | cut -d ' ' -f 1 | xargs gem uninstall | ruby | rubygems | ruby-1.9 | null | null | 12/13/2009 19:46:28 | off topic | How to correctly uninstall Ruby 1.9.1
===
Hi:) I have manually set Ruby 1.9.1. I have installed it via
./configure --prefix=/opt
make
make install
The target 'uninstall' does not exist in generated Makefile ...
How to do uninstallation **correctly?**
PS: I also believe that it is necessary to remove all the gems.
For this I use
#!/bin/sh
gem list --local | grep [^\*] | cut -d ' ' -f 1 | xargs gem uninstall | 2 |
1,019,964 | 06/19/2009 20:45:43 | 95,157 | 04/23/2009 20:02:59 | 1,372 | 65 | Supporting DataContracts in .Net 2.0 libraries | Is it possible to create a library that can be consumed from .Net 2.0 and also allows .Net 3.0+ consumers to benefit from DataContracts if they wish?
I don't see any technical obstacle for this other than the library that contains the different DataContract related attributes is a .Net 3.0 library. Can these attributes be implemented manually in similar way as ExtensionMethodAttribute? | .net | .net-2.0 | datacontract | compatibility | attributes | null | open | Supporting DataContracts in .Net 2.0 libraries
===
Is it possible to create a library that can be consumed from .Net 2.0 and also allows .Net 3.0+ consumers to benefit from DataContracts if they wish?
I don't see any technical obstacle for this other than the library that contains the different DataContract related attributes is a .Net 3.0 library. Can these attributes be implemented manually in similar way as ExtensionMethodAttribute? | 0 |
10,048,331 | 04/06/2012 19:31:46 | 1,318,120 | 04/06/2012 19:23:16 | 1 | 0 | C# getting pixels in picturebox with cursor? | How can i get pixel(x,y) in picturebox with cursor? | c# | bitmap | cursor | picturebox | null | 04/07/2012 19:29:13 | not a real question | C# getting pixels in picturebox with cursor?
===
How can i get pixel(x,y) in picturebox with cursor? | 1 |
5,671,641 | 04/15/2011 01:58:32 | 690,201 | 04/03/2011 20:18:25 | 1 | 0 | Where to put a PrintStream object to print a variable java | I have a code that generates combinations and prints to screen, I'd like to print this to a file but Im not sure where to put my PrintStream object to have access to the String I'd like to print.
public class Main {
public static void main(String args[]) {
brute("12345", 5, new StringBuffer());
}
static void brute(String input, int depth, StringBuffer output) {
if (depth == 0) {
System.out.println(output);
} else {
for (int i = 0; i < input.length(); i++) {
output.append(input.charAt(i));
brute(input, depth - 1, output);
output.deleteCharAt(output.length() - 1);
}
}
}
}
Thanks, | java | printing | null | null | null | null | open | Where to put a PrintStream object to print a variable java
===
I have a code that generates combinations and prints to screen, I'd like to print this to a file but Im not sure where to put my PrintStream object to have access to the String I'd like to print.
public class Main {
public static void main(String args[]) {
brute("12345", 5, new StringBuffer());
}
static void brute(String input, int depth, StringBuffer output) {
if (depth == 0) {
System.out.println(output);
} else {
for (int i = 0; i < input.length(); i++) {
output.append(input.charAt(i));
brute(input, depth - 1, output);
output.deleteCharAt(output.length() - 1);
}
}
}
}
Thanks, | 0 |
3,021,104 | 06/11/2010 07:54:00 | 294,785 | 03/16/2010 13:43:15 | 141 | 5 | Horizontal sliding doors (improve). | I have script:
http://jsfiddle.net/NV2uV/
It works, but I do not like.
Cons:
1. Wrench (edge blocks).
2. In the transition from one unit to another - animation is performed in two steps (I want a continuous animation).
3. Script code is not beautiful, very much repetition.
In short - it looks not nice.
How to improve the script to look at the animation and it was good fo eyes (if you have ready-made solutions - please note me). | jquery | animation | improvement | sliding-doors | null | null | open | Horizontal sliding doors (improve).
===
I have script:
http://jsfiddle.net/NV2uV/
It works, but I do not like.
Cons:
1. Wrench (edge blocks).
2. In the transition from one unit to another - animation is performed in two steps (I want a continuous animation).
3. Script code is not beautiful, very much repetition.
In short - it looks not nice.
How to improve the script to look at the animation and it was good fo eyes (if you have ready-made solutions - please note me). | 0 |
5,712,760 | 04/19/2011 07:03:31 | 672,263 | 03/23/2011 01:43:18 | 10 | 0 | Count, index out of range | I have this code to return a number but I get the error: IndexError: index out of range: 0
with the return.
nbus=1
users = []
for i in range(nb):
ind = (int(nbus)-1)
ind= ind +1
return users[ind]
Do you know why?
Thanks | python | null | null | null | null | 04/19/2011 07:39:58 | not a real question | Count, index out of range
===
I have this code to return a number but I get the error: IndexError: index out of range: 0
with the return.
nbus=1
users = []
for i in range(nb):
ind = (int(nbus)-1)
ind= ind +1
return users[ind]
Do you know why?
Thanks | 1 |
6,081,699 | 05/21/2011 12:25:01 | 664,067 | 03/17/2011 09:46:49 | 358 | 4 | iPhone : How to display popup view like controller with image in iPhone? | I want to display small popup view (just like popup view in iPad but here I want in iPhone) in iPhone with image.
How can I do that ? | iphone | objective-c | cocoa-touch | iphone-sdk-4.0 | null | null | open | iPhone : How to display popup view like controller with image in iPhone?
===
I want to display small popup view (just like popup view in iPad but here I want in iPhone) in iPhone with image.
How can I do that ? | 0 |
6,895,800 | 08/01/2011 08:20:12 | 284,463 | 03/02/2010 14:19:08 | 31 | 0 | Problem with wanting to change 2 rows in table2 into 2 columns in table1 | Forgive me for the seemingly low level expressions, because i'm not trained in access.
So i have 2 tables, table1 with primary key as plant_author_id, and table2 with primary key as plant_name_id. ![enter image description here][1]
Sometimes there would be 2 rows of identical but with different author_type_ids as shown in the picture above. What i want to achieve is to have these two rows appear as 2 columns in Table1 under the column_names Primary_author and Parenthetical_author and under these columns would be the author_id. If there isn't any parenthetical rows, it would be blank in table2 under Column Parenthetical author
(author_id and plant_author_id does not appear in table1).
Any help would be appreciated.
![enter image description here][2]
[1]: http://i.stack.imgur.com/a6TQj.jpg
[2]: http://i.stack.imgur.com/hH5Ya.jpg | ms-access | null | null | null | null | null | open | Problem with wanting to change 2 rows in table2 into 2 columns in table1
===
Forgive me for the seemingly low level expressions, because i'm not trained in access.
So i have 2 tables, table1 with primary key as plant_author_id, and table2 with primary key as plant_name_id. ![enter image description here][1]
Sometimes there would be 2 rows of identical but with different author_type_ids as shown in the picture above. What i want to achieve is to have these two rows appear as 2 columns in Table1 under the column_names Primary_author and Parenthetical_author and under these columns would be the author_id. If there isn't any parenthetical rows, it would be blank in table2 under Column Parenthetical author
(author_id and plant_author_id does not appear in table1).
Any help would be appreciated.
![enter image description here][2]
[1]: http://i.stack.imgur.com/a6TQj.jpg
[2]: http://i.stack.imgur.com/hH5Ya.jpg | 0 |
3,455,625 | 08/11/2010 05:58:00 | 243,655 | 01/05/2010 04:42:34 | 19 | 0 | Linux command to print directory structure in the form of a tree | Is there any linux command that will print the directory structure in the form of a tree, e.g.,
folder1
a.txt
b.txt
folder2
folder3
| linux | null | null | null | null | null | open | Linux command to print directory structure in the form of a tree
===
Is there any linux command that will print the directory structure in the form of a tree, e.g.,
folder1
a.txt
b.txt
folder2
folder3
| 0 |
6,716,490 | 07/16/2011 09:23:28 | 847,636 | 07/16/2011 09:23:28 | 1 | 0 | Jquery website under problems | static.jquery.com is down so the jquery.com website CSS and js not available !!!
I hope all the sites that were linking their jquery from the static.jquery.com might be doing well or not?
I've checked the site availability but got the down answer too
http://www.downforeveryoneorjustme.com/http://static.jquery.com | jquery | null | null | null | null | 07/16/2011 12:10:25 | not a real question | Jquery website under problems
===
static.jquery.com is down so the jquery.com website CSS and js not available !!!
I hope all the sites that were linking their jquery from the static.jquery.com might be doing well or not?
I've checked the site availability but got the down answer too
http://www.downforeveryoneorjustme.com/http://static.jquery.com | 1 |
11,715,304 | 07/30/2012 04:08:54 | 838,253 | 07/11/2011 05:06:34 | 95 | 9 | Automator Could not connect the action buttonPressed: to target of class NSApplication | I wanted to add an Automator Action to my Application.
This should take a path as input and post a notification to the `NSDistributedNotificationCenter`.
I wrote a test app which included the Automator Action bundle and displayed the path on the screen.
This works perfectly well, so I then included in my Application to do some real work with the path.
I created an Automator Service using the Action.
This works, but on the Console I get 4 or 5 messages.
com.apple.automator.xpc.workflowServiceRunner: Could not connect the action buttonPressed: to target of class NSApplication
I have googled, and found several posts mentioning the message, but no real resolution.
I am puzzled, as the projects to create the Action bundle are almost identical (differing only in name and string constants) but the test app runs without any messages. Incidentally there seems to be no problem in a workflow, which is not a Service.
The content of the code is as follows:-
- (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary **)errorInfo {
if ([input count]) {
NSDistributedNotificationCenter *dc = [NSDistributedNotificationCenter defaultCenter];
[dc postNotificationName:QETNotification object:@"OpenInApplication"
userInfo:[NSDictionary dictionaryWithObject:input
forKey:@"Directory"]];
}
return input;
}
One further mystery.
The documentation indicates that the method is Deprecated, but there seems to be no alternative, but Xcode 4.3.3 generates this for `Application Plug-in` `Automator Action`
runWithInput:fromAction:error:
Requests the receiver to perform its task using the specified input from the specified action. (Deprecated in Mac OS X v10.4.)
- (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary **)errorInfo
| objective-c | osx-lion | null | null | null | null | open | Automator Could not connect the action buttonPressed: to target of class NSApplication
===
I wanted to add an Automator Action to my Application.
This should take a path as input and post a notification to the `NSDistributedNotificationCenter`.
I wrote a test app which included the Automator Action bundle and displayed the path on the screen.
This works perfectly well, so I then included in my Application to do some real work with the path.
I created an Automator Service using the Action.
This works, but on the Console I get 4 or 5 messages.
com.apple.automator.xpc.workflowServiceRunner: Could not connect the action buttonPressed: to target of class NSApplication
I have googled, and found several posts mentioning the message, but no real resolution.
I am puzzled, as the projects to create the Action bundle are almost identical (differing only in name and string constants) but the test app runs without any messages. Incidentally there seems to be no problem in a workflow, which is not a Service.
The content of the code is as follows:-
- (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary **)errorInfo {
if ([input count]) {
NSDistributedNotificationCenter *dc = [NSDistributedNotificationCenter defaultCenter];
[dc postNotificationName:QETNotification object:@"OpenInApplication"
userInfo:[NSDictionary dictionaryWithObject:input
forKey:@"Directory"]];
}
return input;
}
One further mystery.
The documentation indicates that the method is Deprecated, but there seems to be no alternative, but Xcode 4.3.3 generates this for `Application Plug-in` `Automator Action`
runWithInput:fromAction:error:
Requests the receiver to perform its task using the specified input from the specified action. (Deprecated in Mac OS X v10.4.)
- (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary **)errorInfo
| 0 |
474,889 | 01/23/2009 22:35:47 | 41,662 | 11/28/2008 18:33:04 | 77 | 1 | How to run a C# main in an ASP.NET app | I'm developing an ASP.NET 2.0 app using Visual Studio 2008.
If I want to run a really quick test on a method that's way in my back-end, is there a way for me to just call a main function in that class via command line?
Thanks | asp.net | c# | testing | null | null | null | open | How to run a C# main in an ASP.NET app
===
I'm developing an ASP.NET 2.0 app using Visual Studio 2008.
If I want to run a really quick test on a method that's way in my back-end, is there a way for me to just call a main function in that class via command line?
Thanks | 0 |
5,381,749 | 03/21/2011 18:11:03 | 669,922 | 03/21/2011 18:11:03 | 1 | 0 | how click a button on a web site in vb 6.0 | how can i click a button on website given that i have the web browser control in my visual basic 6.0 i need it for my project where i want to automatically click a button from a series of buttons | browser | vb6 | control | null | null | null | open | how click a button on a web site in vb 6.0
===
how can i click a button on website given that i have the web browser control in my visual basic 6.0 i need it for my project where i want to automatically click a button from a series of buttons | 0 |
3,301,137 | 07/21/2010 15:43:24 | 398,174 | 07/21/2010 15:41:12 | 1 | 0 | Zend_Form: Duplicate decorator IDs on subforms | I'm using Zend_Form from Zend Framework 1.10.6 to render a html form. In this form 'z', there's a subform with a field 'a'. The subform is added to the main form twice, once with the name 'x' and once as 'y'.
Below is the html rendered by the Zend_Form-object.
<form id="z" enctype="application/x-www-form-urlencoded" method="post" action="">
<dl class="zend_form">
<dt id="x-label"> </dt>
<dd id="x-element">
<fieldset id="fieldset-x">
<dl>
<dt id="a-label"><label for="x-a" class="required">A</label></dt>
<dd id="a-element"><input type="text" name="x[a]" id="x-a" value="" /></dd>
</dl>
</fieldset>
</dd>
<dt id="y-label"> </dt>
<dd id="y-element">
<fieldset id="fieldset-y">
<dl>
<dt id="a-label"><label for="y-a" class="optional">A</label></dt>
<dd id="a-element"><input type="text" name="y[a]" id="y-a" value="" /></dd>
</dl>
</fieldset>
</dd>
<dt id="submit-label"> </dt><dd id="submit-element"><input type="submit" name="submit" id="submit" value="Submit" /></dd>
</dl>
</form>
The only problem is now that the standard decorator (`<dt>`, `<dd>`) generates duplicate IDs. Why aren't these IDs prefixed with the subform name and a dash, like the IDs of the input fields are? | php | zend-framework | zend | zend-form | null | null | open | Zend_Form: Duplicate decorator IDs on subforms
===
I'm using Zend_Form from Zend Framework 1.10.6 to render a html form. In this form 'z', there's a subform with a field 'a'. The subform is added to the main form twice, once with the name 'x' and once as 'y'.
Below is the html rendered by the Zend_Form-object.
<form id="z" enctype="application/x-www-form-urlencoded" method="post" action="">
<dl class="zend_form">
<dt id="x-label"> </dt>
<dd id="x-element">
<fieldset id="fieldset-x">
<dl>
<dt id="a-label"><label for="x-a" class="required">A</label></dt>
<dd id="a-element"><input type="text" name="x[a]" id="x-a" value="" /></dd>
</dl>
</fieldset>
</dd>
<dt id="y-label"> </dt>
<dd id="y-element">
<fieldset id="fieldset-y">
<dl>
<dt id="a-label"><label for="y-a" class="optional">A</label></dt>
<dd id="a-element"><input type="text" name="y[a]" id="y-a" value="" /></dd>
</dl>
</fieldset>
</dd>
<dt id="submit-label"> </dt><dd id="submit-element"><input type="submit" name="submit" id="submit" value="Submit" /></dd>
</dl>
</form>
The only problem is now that the standard decorator (`<dt>`, `<dd>`) generates duplicate IDs. Why aren't these IDs prefixed with the subform name and a dash, like the IDs of the input fields are? | 0 |
2,717,813 | 04/26/2010 23:56:58 | 117,700 | 06/04/2009 23:04:34 | 1,479 | 19 | using MySql.data in C# | i am connect to a mysql database using this example:
http://bitdaddys.com/MySQL-ConnectorNet.html
at the top the instruction is to:
Next add reference to: MySql.Data
how do i do that? | c# | mysql | .net | null | null | null | open | using MySql.data in C#
===
i am connect to a mysql database using this example:
http://bitdaddys.com/MySQL-ConnectorNet.html
at the top the instruction is to:
Next add reference to: MySql.Data
how do i do that? | 0 |
9,095,635 | 02/01/2012 12:15:14 | 669,187 | 03/21/2011 09:53:58 | 103 | 2 | How to Convert string to byte? | Dear Programmers..,
Actually , i need to convert string to byte not to byte array.
My code goes like this:
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
byte[] FingerTMP =Convert.ToByte(encoding.GetBytes(UTempInfo.FP_TEMPLATE));
if (zkem.SSR_SetUserTmpExt(DeviceModel.MachineNumber, 1, UTempInfo.EMP_ID.ToString(), int.Parse(UTempInfo.BACKUP_ID), ref FingerTMP))
{
}
It gives error like : Cannot implicitly convert ref byte[] to ref byte.
Any solutions. | c# | winforms | null | null | null | 02/01/2012 15:11:28 | not a real question | How to Convert string to byte?
===
Dear Programmers..,
Actually , i need to convert string to byte not to byte array.
My code goes like this:
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
byte[] FingerTMP =Convert.ToByte(encoding.GetBytes(UTempInfo.FP_TEMPLATE));
if (zkem.SSR_SetUserTmpExt(DeviceModel.MachineNumber, 1, UTempInfo.EMP_ID.ToString(), int.Parse(UTempInfo.BACKUP_ID), ref FingerTMP))
{
}
It gives error like : Cannot implicitly convert ref byte[] to ref byte.
Any solutions. | 1 |
5,894,027 | 05/05/2011 07:19:36 | 739,389 | 05/05/2011 07:19:36 | 1 | 0 | How to allow negative values,xml schema? Please find below the schema... | <xs:element name="Quantity" minOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10" />
<xs:minLength value="1" />
<xs:pattern value="[0-9]*" />
</xs:restriction>
</xs:simpleType>
</xs:element> | java | xml | null | null | null | null | open | How to allow negative values,xml schema? Please find below the schema...
===
<xs:element name="Quantity" minOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10" />
<xs:minLength value="1" />
<xs:pattern value="[0-9]*" />
</xs:restriction>
</xs:simpleType>
</xs:element> | 0 |
10,630,011 | 05/17/2012 04:53:11 | 1,371,590 | 05/03/2012 05:03:57 | 10 | 0 | how to read and display database content in android | How can I read my database and display it as different colour for different row?
Please provide coding will be much appreciate. Since I'm new to android. Thanks. | android | null | null | null | null | 05/17/2012 06:18:32 | not a real question | how to read and display database content in android
===
How can I read my database and display it as different colour for different row?
Please provide coding will be much appreciate. Since I'm new to android. Thanks. | 1 |
4,676,826 | 01/13/2011 04:35:39 | 426,788 | 08/20/2010 21:34:10 | 8 | 0 | Need help finding a good curriculum/methodology for self-teaching to program from scratch | My friend and I have both dedicated ourselves to learning the essentials of programming by June of this year from nearly no programming experience.
I have done some research and have come to the conclusion that using the Python language will be the best for us, but I am open to suggestions with good reasoning behind them.
My motives for learning programming are:
1. Potential Career Path
2. to be able to create programs that can:
solve problems; entertain, i.e. useful applications and games.
Online college lectures + book (which I am willing to purchase) sounds like a good combination, but I do not know which would be most suitable for me.
**tl;dr:
What I would like to find from the excellent people here is the following: a good, potentially best, programming course and/or book that is well structured and uses good pedagogy so that a person dedicated to learn programming may do so by following its curriculum (or use it to develop a curriculum) over the course of a few months.
Thanks!**
(I apologize if this type of question is not considered proper etiquette, but I haven't found a consensus on this, and would like some guidance beyond the research I've already done) | python | books | self | university | null | 09/22/2011 12:28:42 | not constructive | Need help finding a good curriculum/methodology for self-teaching to program from scratch
===
My friend and I have both dedicated ourselves to learning the essentials of programming by June of this year from nearly no programming experience.
I have done some research and have come to the conclusion that using the Python language will be the best for us, but I am open to suggestions with good reasoning behind them.
My motives for learning programming are:
1. Potential Career Path
2. to be able to create programs that can:
solve problems; entertain, i.e. useful applications and games.
Online college lectures + book (which I am willing to purchase) sounds like a good combination, but I do not know which would be most suitable for me.
**tl;dr:
What I would like to find from the excellent people here is the following: a good, potentially best, programming course and/or book that is well structured and uses good pedagogy so that a person dedicated to learn programming may do so by following its curriculum (or use it to develop a curriculum) over the course of a few months.
Thanks!**
(I apologize if this type of question is not considered proper etiquette, but I haven't found a consensus on this, and would like some guidance beyond the research I've already done) | 4 |
9,542,134 | 03/03/2012 00:13:26 | 1,124,914 | 01/01/2012 07:09:31 | 54 | 0 | How to make linux-system waiting on an OpenCV program? | I have a very simple program on OpenCV:
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
using namespace std;
void showVideo(CvCapture *video)
{
int width = (int) cvGetCaptureProperty(video, CV_CAP_PROP_FRAME_WIDTH);
int height = (int) cvGetCaptureProperty(video, CV_CAP_PROP_FRAME_HEIGHT);
//int fps = (int) cvGetCaptureProperty(video, CV_CAP_PROP_FPS);
IplImage* frame = cvCreateImage(cvSize(width, height), 8, 1);
cvNamedWindow("Showing Video:", 0);
while (true)
{
frame = cvQueryFrame(video);
cvShowImage("Showing Video:", frame);
cvWaitKey(10);
}
//cvDestroyWindow("Showing Video:");
//cvReleaseImage(&frame);
}
int main()
{
CvCapture *video = cvCaptureFromCAM(CV_CAP_ANY);
showVideo(video);
return 0;
}
I want to have a `char ch;` and something like this `while(ch != 'q')` then it still plays the video. There is some ways such as `kbhit()` or `getch()` but they are not standard and I want something that whenever the 'q' key is pressed, then the showing the video will finish, otherwise video showing will be still running.
How can I do this job? | c++ | opencv | webcam | null | null | null | open | How to make linux-system waiting on an OpenCV program?
===
I have a very simple program on OpenCV:
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
using namespace std;
void showVideo(CvCapture *video)
{
int width = (int) cvGetCaptureProperty(video, CV_CAP_PROP_FRAME_WIDTH);
int height = (int) cvGetCaptureProperty(video, CV_CAP_PROP_FRAME_HEIGHT);
//int fps = (int) cvGetCaptureProperty(video, CV_CAP_PROP_FPS);
IplImage* frame = cvCreateImage(cvSize(width, height), 8, 1);
cvNamedWindow("Showing Video:", 0);
while (true)
{
frame = cvQueryFrame(video);
cvShowImage("Showing Video:", frame);
cvWaitKey(10);
}
//cvDestroyWindow("Showing Video:");
//cvReleaseImage(&frame);
}
int main()
{
CvCapture *video = cvCaptureFromCAM(CV_CAP_ANY);
showVideo(video);
return 0;
}
I want to have a `char ch;` and something like this `while(ch != 'q')` then it still plays the video. There is some ways such as `kbhit()` or `getch()` but they are not standard and I want something that whenever the 'q' key is pressed, then the showing the video will finish, otherwise video showing will be still running.
How can I do this job? | 0 |
10,864,515 | 06/02/2012 17:37:36 | 700,663 | 04/10/2011 07:56:33 | 1,386 | 13 | I need sample code of using | https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/Reference/Reference.html#//apple_ref/occ/instm/NSNotificationCenter/postNotificationName:object:userInfo:
postNotificationName:object:userInfo:
Basically how does the observer get that userInfo?
Is there a short sample code somewhere to show the whole thing? | objective-c | xcode4.3 | nsnotifications | null | null | 06/02/2012 18:24:37 | not a real question | I need sample code of using
===
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/Reference/Reference.html#//apple_ref/occ/instm/NSNotificationCenter/postNotificationName:object:userInfo:
postNotificationName:object:userInfo:
Basically how does the observer get that userInfo?
Is there a short sample code somewhere to show the whole thing? | 1 |
1,026,578 | 06/22/2009 11:06:53 | 76,835 | 03/11/2009 19:03:13 | 887 | 32 | Static files in (Java) App Engine not accessible. | The [example documentation][1] says that you simply need to place your files in war/ (or a subdirectory) and they should be accessible from the host (as long as they aren't JSPs or in WEB-INF). For example, if you place foo.css in war/ then you should be able to access it at http://localhost:8080/foo.css. However, this isn't working for me at all. NONE of my static files are accessible.
The docs on [appengine-web.xml][2] say that you can also specifically denote certain types as static. I've tried this as well and it makes no difference.
Am I missing something obvious?
[1]: http://code.google.com/appengine/docs/java/gettingstarted/staticfiles.html
[2]: http://code.google.com/appengine/docs/java/config/appconfig.html | google-app-engine | java | null | null | null | null | open | Static files in (Java) App Engine not accessible.
===
The [example documentation][1] says that you simply need to place your files in war/ (or a subdirectory) and they should be accessible from the host (as long as they aren't JSPs or in WEB-INF). For example, if you place foo.css in war/ then you should be able to access it at http://localhost:8080/foo.css. However, this isn't working for me at all. NONE of my static files are accessible.
The docs on [appengine-web.xml][2] say that you can also specifically denote certain types as static. I've tried this as well and it makes no difference.
Am I missing something obvious?
[1]: http://code.google.com/appengine/docs/java/gettingstarted/staticfiles.html
[2]: http://code.google.com/appengine/docs/java/config/appconfig.html | 0 |
11,294,427 | 07/02/2012 13:13:03 | 1,496,078 | 07/02/2012 12:41:42 | 1 | 0 | how i get followers list of twitter in android but this code gives an error like class cast exception , please correct me if i am wrong | //////////////after completion of retrieverequest ///////////////////
@Override
protected void onResume()
{
super.onResume();
System.out.println("resume");
Uri uri = this.getIntent().getData();
System.out.println(uri);
if (uri != null && uri.toString().startsWith(callback_url))
{
String verify=uri.getQueryParameter(OAuth.OAUTH_VERIFIER);
System.out.println("String verify::"+verify);
try {
provide.retrieveAccessToken(consumer, verify);
String key=consumer.getToken();
String secretkey=consumer.getTokenSecret();
SharedPreferences.Editor editor =spp.edit();
editor.putString(OAuth.OAUTH_TOKEN, consumer.getToken());
editor.putString(OAuth.OAUTH_TOKEN_SECRET, consumer.getTokenSecret());
editor.commit();
String token = spp.getString(OAuth.OAUTH_TOKEN, "");
String secret = spp.getString(OAuth.OAUTH_TOKEN_SECRET, "");
consumer.setTokenWithSecret(token, secret);
System.out.println("completed");
getfriend(token,secret,twitter);
} catch (OAuthMessageSignerException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (OAuthNotAuthorizedException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (OAuthExpectationFailedException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (OAuthCommunicationException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
///////////////////getting friendlist//////////////////
private void getfriend(String token, String secret, Twitter twitter)
{
mytwitter tw=new mytwitter(token,secret,consumer);
tw.get("http://api.twitter.com/1/followers/ids.format");
}
}
public class mytwitter
{
String token;
String secret;
OAuthConsumer consumer;
public mytwitter(String token, String secret,
CommonsHttpOAuthConsumer consumer)
{
this.token=token;
this.secret=secret;
this.consumer=consumer;
}
public void get(String url)
{
System.out.println("url is::"+url);
checking(url);
org.apache.http.client.HttpClient client=new DefaultHttpClient();
System.out.println("res:::::::"+client);
HttpGet myget=new HttpGet(url);
//myget.setHeader("screen_name", "");
HttpResponse httpResponse = null;
try {
httpResponse = (HttpResponse) client.execute(myget);
String res="";
res = EntityUtils.toString(((org.apache.http.HttpResponse) httpResponse).getEntity());
System.out.println("res:::::::"+res);
//httpResponseToSccessfull(res);
} catch (ClientProtocolException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
private void checking(String url)
{
System.out.println("in sign method url is::"+url);
try {
consumer.sign(url);
System.out.println("geting url completed"+consumer.sign(url));
} catch (OAuthMessageSignerException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
} catch (OAuthExpectationFailedException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
} catch (OAuthCommunicationException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
| android | twitter | twitter-api | twitter4j | null | 07/02/2012 14:06:53 | not a real question | how i get followers list of twitter in android but this code gives an error like class cast exception , please correct me if i am wrong
===
//////////////after completion of retrieverequest ///////////////////
@Override
protected void onResume()
{
super.onResume();
System.out.println("resume");
Uri uri = this.getIntent().getData();
System.out.println(uri);
if (uri != null && uri.toString().startsWith(callback_url))
{
String verify=uri.getQueryParameter(OAuth.OAUTH_VERIFIER);
System.out.println("String verify::"+verify);
try {
provide.retrieveAccessToken(consumer, verify);
String key=consumer.getToken();
String secretkey=consumer.getTokenSecret();
SharedPreferences.Editor editor =spp.edit();
editor.putString(OAuth.OAUTH_TOKEN, consumer.getToken());
editor.putString(OAuth.OAUTH_TOKEN_SECRET, consumer.getTokenSecret());
editor.commit();
String token = spp.getString(OAuth.OAUTH_TOKEN, "");
String secret = spp.getString(OAuth.OAUTH_TOKEN_SECRET, "");
consumer.setTokenWithSecret(token, secret);
System.out.println("completed");
getfriend(token,secret,twitter);
} catch (OAuthMessageSignerException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (OAuthNotAuthorizedException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (OAuthExpectationFailedException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (OAuthCommunicationException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
///////////////////getting friendlist//////////////////
private void getfriend(String token, String secret, Twitter twitter)
{
mytwitter tw=new mytwitter(token,secret,consumer);
tw.get("http://api.twitter.com/1/followers/ids.format");
}
}
public class mytwitter
{
String token;
String secret;
OAuthConsumer consumer;
public mytwitter(String token, String secret,
CommonsHttpOAuthConsumer consumer)
{
this.token=token;
this.secret=secret;
this.consumer=consumer;
}
public void get(String url)
{
System.out.println("url is::"+url);
checking(url);
org.apache.http.client.HttpClient client=new DefaultHttpClient();
System.out.println("res:::::::"+client);
HttpGet myget=new HttpGet(url);
//myget.setHeader("screen_name", "");
HttpResponse httpResponse = null;
try {
httpResponse = (HttpResponse) client.execute(myget);
String res="";
res = EntityUtils.toString(((org.apache.http.HttpResponse) httpResponse).getEntity());
System.out.println("res:::::::"+res);
//httpResponseToSccessfull(res);
} catch (ClientProtocolException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
private void checking(String url)
{
System.out.println("in sign method url is::"+url);
try {
consumer.sign(url);
System.out.println("geting url completed"+consumer.sign(url));
} catch (OAuthMessageSignerException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
} catch (OAuthExpectationFailedException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
} catch (OAuthCommunicationException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
| 1 |
2,588,340 | 04/06/2010 21:06:38 | 144,023 | 07/23/2009 20:08:44 | 22 | 1 | MySQL LEFT JOIN issue with three WHERE statements | I am building a note taking app for myself with tag filtering functions, but am having an issue when trying to grab notes with the tags. The tag filter needs to use AND not IN, because it will help better narrow down what I am looking for.
My tables are configured like this:
+ notes note_id | note_title | note_uid
+ tags tag_id | tag_title
+ notes_tags nt_id | nt_note_id | nt_tag_id
The notes_tags table keeps track of all notes' tags.
*I am not worried about returning any information about tags*, so here is an example LEFT JOIN I am using currently to only get notes with **only 1** tag.
> SELECT * FROM notes_tags LEFT JOIN notes ON note_id = nt_note_id WHERE note_uid IN ( 1 ) AND nt_tag_id = 10
This query runs perfect, it grabs all of the notes with that **single tag**. However, I am having issues "pinpointing" my notes using a query like this:
> SELECT * FROM notes_tags LEFT JOIN notes ON note_id = nt_note_id WHERE note_uid IN ( 1 ) AND nt_tag_id = 10 **AND nt_tag_id = 11**
What am I doing wrong with the syntax? | php | mysql | left-join | where-clause | null | null | open | MySQL LEFT JOIN issue with three WHERE statements
===
I am building a note taking app for myself with tag filtering functions, but am having an issue when trying to grab notes with the tags. The tag filter needs to use AND not IN, because it will help better narrow down what I am looking for.
My tables are configured like this:
+ notes note_id | note_title | note_uid
+ tags tag_id | tag_title
+ notes_tags nt_id | nt_note_id | nt_tag_id
The notes_tags table keeps track of all notes' tags.
*I am not worried about returning any information about tags*, so here is an example LEFT JOIN I am using currently to only get notes with **only 1** tag.
> SELECT * FROM notes_tags LEFT JOIN notes ON note_id = nt_note_id WHERE note_uid IN ( 1 ) AND nt_tag_id = 10
This query runs perfect, it grabs all of the notes with that **single tag**. However, I am having issues "pinpointing" my notes using a query like this:
> SELECT * FROM notes_tags LEFT JOIN notes ON note_id = nt_note_id WHERE note_uid IN ( 1 ) AND nt_tag_id = 10 **AND nt_tag_id = 11**
What am I doing wrong with the syntax? | 0 |
3,974,782 | 10/20/2010 04:33:41 | 131,270 | 06/30/2009 19:01:01 | 130 | 1 | retrieving form values from ASP.NET MVC application | I am learning ASP.NET MVC, and ran across a video on the asp.net/mvc website that showed how to retrieve a value from a textbox after a postback. In the video the author simply grabs the value from the Request object in the controller.
It seems like this breaks the separation of concerns concept? By doing this the controller is now dependent upon the presence of a Request object which won't exist if one runs unit tests against the controller.
So I assume this is an incorrect way of retrieving form data on a postback. What is the correct way? Once I am in my controller, how do I get access to the postback data?
It seems there should be some intermediate step that essentially pulls the data from the postback and packages it into a nice object or some other format that the controller would then used? | asp.net | mvc | null | null | null | null | open | retrieving form values from ASP.NET MVC application
===
I am learning ASP.NET MVC, and ran across a video on the asp.net/mvc website that showed how to retrieve a value from a textbox after a postback. In the video the author simply grabs the value from the Request object in the controller.
It seems like this breaks the separation of concerns concept? By doing this the controller is now dependent upon the presence of a Request object which won't exist if one runs unit tests against the controller.
So I assume this is an incorrect way of retrieving form data on a postback. What is the correct way? Once I am in my controller, how do I get access to the postback data?
It seems there should be some intermediate step that essentially pulls the data from the postback and packages it into a nice object or some other format that the controller would then used? | 0 |
7,923,879 | 10/28/2011 00:10:35 | 1,017,513 | 10/28/2011 00:02:44 | 1 | 0 | Running php code within WYSIWYG editor | I got the execPHP plug in installed. no problems with it as far as executing the php code thru the editor... for example, I tried the following the PHP snippet within the WYSIWYG editor and it works...
[?php echo get_post_meta(1717, 'Ref', true); ?]
it outputs the value stored within the custom field titled REF. And the 1717 happens to be the current post id of the post I was editing.
here is the question...
whenever I tried to access post related data ( usually available in the wordpress loop ), nothing gets outputted. for example, the following produces nothing...
[?php echo ("postid=" . $post->ID ); ?]
Within the WYSIWYG editor, even the the_ID() outputs nothing. I thought, we were still in the wordpress loop and I could tap into any post related data at the moment.
my goal was to replace the [?php echo get_post_meta(1717, 'Ref', true); ?] with [?php echo get_post_meta($post->ID, 'Ref', true); ?]
What am I doing wrong? | wordpress | wysiwyg | null | null | null | null | open | Running php code within WYSIWYG editor
===
I got the execPHP plug in installed. no problems with it as far as executing the php code thru the editor... for example, I tried the following the PHP snippet within the WYSIWYG editor and it works...
[?php echo get_post_meta(1717, 'Ref', true); ?]
it outputs the value stored within the custom field titled REF. And the 1717 happens to be the current post id of the post I was editing.
here is the question...
whenever I tried to access post related data ( usually available in the wordpress loop ), nothing gets outputted. for example, the following produces nothing...
[?php echo ("postid=" . $post->ID ); ?]
Within the WYSIWYG editor, even the the_ID() outputs nothing. I thought, we were still in the wordpress loop and I could tap into any post related data at the moment.
my goal was to replace the [?php echo get_post_meta(1717, 'Ref', true); ?] with [?php echo get_post_meta($post->ID, 'Ref', true); ?]
What am I doing wrong? | 0 |
2,925,781 | 05/27/2010 23:42:49 | 51,197 | 01/03/2009 17:39:24 | 2,735 | 72 | Encrypt text using a number | ## Project Euler ##
I have recently begun to solve some of the [Project Euler][1] riddles. I found the discussion forum in the site a bit frustrating (most of the discussions are closed and poorly-threaded), So I have decided to [publish my Python solutions on launchpad][2] for discussion.
The problem is that it seems quite unethical to publish these solutions, as it would let other people gain reputation without doing the programming work, which the site deeply discourages.
##My Encryption problem
I want to encrypt my answers so that only those who have already solved the riddles can see my code. The logical key would be the answer to the riddle, which is always numeric.
In order to prevent brute-force attacks on my answers, I want to find an encryption algorithm that takes a significantly long time (few seconds) to run.
Do you know any such algorithm? I would fancy a Python package, which I can attach to the code, over an external program that might have portability issues.
Thanks,
Adam
[1]: http://projecteuler.net/
[2]: http://bazaar.launchpad.net/~adam-matan/python-euler/trunk/files | python | algorithm | encryption | project-euler | null | null | open | Encrypt text using a number
===
## Project Euler ##
I have recently begun to solve some of the [Project Euler][1] riddles. I found the discussion forum in the site a bit frustrating (most of the discussions are closed and poorly-threaded), So I have decided to [publish my Python solutions on launchpad][2] for discussion.
The problem is that it seems quite unethical to publish these solutions, as it would let other people gain reputation without doing the programming work, which the site deeply discourages.
##My Encryption problem
I want to encrypt my answers so that only those who have already solved the riddles can see my code. The logical key would be the answer to the riddle, which is always numeric.
In order to prevent brute-force attacks on my answers, I want to find an encryption algorithm that takes a significantly long time (few seconds) to run.
Do you know any such algorithm? I would fancy a Python package, which I can attach to the code, over an external program that might have portability issues.
Thanks,
Adam
[1]: http://projecteuler.net/
[2]: http://bazaar.launchpad.net/~adam-matan/python-euler/trunk/files | 0 |
786,858 | 04/24/2009 17:32:57 | 45,434 | 12/11/2008 17:29:09 | 101 | 7 | Fitting title for my position | In the last 2 years my company has developed a boxed and full-price computer game. All the software development has been done collaboratively by me and my co-developer. We know each other from university and got hired at the same day to equal conditions and we share the same responsibilites including the decisions of what technology to license and how to spend development resources and even how team-workflow is organized. But I struggle to find the correct wording for my position. Can I call myself a senior developer with only 3 years working-experience? Can I call myself lead programmer if I don't really have a team to "lead"?
All these fancy names used in the industry (Technical Lead, Development Lead, Software Architect) seem to imply that you aren't actually coding anymore. On the other hand titles like "Programmer" or "Software Engineer" seem to imply that there's someone between you and the project management. That makes it hard to fill out a resume or even the badges you typically wear on conferences... people tend to judge you by your title and I'd like to avoid confusion where possible. | jobtitle | null | null | null | null | 01/28/2012 21:11:46 | not constructive | Fitting title for my position
===
In the last 2 years my company has developed a boxed and full-price computer game. All the software development has been done collaboratively by me and my co-developer. We know each other from university and got hired at the same day to equal conditions and we share the same responsibilites including the decisions of what technology to license and how to spend development resources and even how team-workflow is organized. But I struggle to find the correct wording for my position. Can I call myself a senior developer with only 3 years working-experience? Can I call myself lead programmer if I don't really have a team to "lead"?
All these fancy names used in the industry (Technical Lead, Development Lead, Software Architect) seem to imply that you aren't actually coding anymore. On the other hand titles like "Programmer" or "Software Engineer" seem to imply that there's someone between you and the project management. That makes it hard to fill out a resume or even the badges you typically wear on conferences... people tend to judge you by your title and I'd like to avoid confusion where possible. | 4 |
4,054,377 | 10/29/2010 17:28:05 | 98,814 | 04/30/2009 18:14:05 | 465 | 30 | Javascript/CSS Tooltip that you can hover over and click | I'm looking for a javascript/css tooltip that can do the following:
1. Shows up when you hover over some page element (such as a help icon.)
2. Repositions itself based on the browser window (for example if it's on the far right of the page, it will show itself to the left of the page element, otherwise it'll show to the right of it. That way it won't go off of the page.)
3. You can hover over the tooltip and it won't disappear. This way you can select text or click on a hyperlink within the tooltip.
I'm using dojo but their dijit tooltip seems to be very inflexible, as it can only spawn off of another dijit element, most commonly a dijit button. I'd rather not having to reference a whole other javascript framework like jquery or prototype so hopefully someone has a way to do this using just one basic script. | javascript | css | tooltip | null | null | null | open | Javascript/CSS Tooltip that you can hover over and click
===
I'm looking for a javascript/css tooltip that can do the following:
1. Shows up when you hover over some page element (such as a help icon.)
2. Repositions itself based on the browser window (for example if it's on the far right of the page, it will show itself to the left of the page element, otherwise it'll show to the right of it. That way it won't go off of the page.)
3. You can hover over the tooltip and it won't disappear. This way you can select text or click on a hyperlink within the tooltip.
I'm using dojo but their dijit tooltip seems to be very inflexible, as it can only spawn off of another dijit element, most commonly a dijit button. I'd rather not having to reference a whole other javascript framework like jquery or prototype so hopefully someone has a way to do this using just one basic script. | 0 |
7,650,310 | 10/04/2011 15:28:07 | 978,757 | 10/04/2011 15:21:11 | 1 | 0 | How do I move a painted line in Java,using my mouse? | I hava a project which will look like similar to Paint program. Here, I'm supposed to draw lines with start and end points and then I need to be able to move these lines by simply dragging my mouse on them.
I draw the lines using the drawLine method of Java. The problem is, I have no idea how to move these lines :(
Please help me if you have an idea on this,
Thanks. | java | null | null | null | null | 10/04/2011 15:54:07 | not a real question | How do I move a painted line in Java,using my mouse?
===
I hava a project which will look like similar to Paint program. Here, I'm supposed to draw lines with start and end points and then I need to be able to move these lines by simply dragging my mouse on them.
I draw the lines using the drawLine method of Java. The problem is, I have no idea how to move these lines :(
Please help me if you have an idea on this,
Thanks. | 1 |
3,313,785 | 07/22/2010 21:48:37 | 399,636 | 07/22/2010 21:09:17 | 1 | 0 | NetBeans 6.9 and JUnit 4.8.2 package visibility problem | I recently upgraded from NetBeans 6.7.1 to NetBeans 6.9 and my old JUnit tests are showing "cannot find symbol" errors in the NetBeans editor around the import statements.
Everything builds correctly on these unit tests and I can still run/debug the unit tests without any issues. However, auto-complete within the editor doesn't work at all for the classes it can't find. This is making it difficult to create new JUnit tests.
I can import classes from another module within the suite correctly. Java API classes also import without issue. This seems like a dependency issue, but I don't know how to fix it.
Here's the hypothetical NetBeans project structure I'm running on:
<pre><code>MyCodeSuite
- MyNetBeansModule1
- - Source Packages
- - - com.company.module1.foo
- - - - DoSomething1
- - - - DoSomethingElse1
- - - - ClassInQuestion
- - Unit Test Packages
- - - com.company.module1.foo
- - - - ClassInQuestionTest
- MyNetBeansModule2
- - Source Packages
- - - com.company.module2.foo
- - - - DoSomething2
- - - - DoSomethingElse2
</code></pre>
ClassInQuestionTest.java:
<pre><code>package com.company.module1.foo;
import com.company.module1.foo.DoSomething1; // this is where the editor starts showing errors; these errors are propagated throughout the code anywhere "DoSomething1" shows up
import com.company.module2.foo.DoSomething2; // the editor doesn't complain for this one
// These imports all work correctly
import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
</code></pre>
I've duplicated this for new unit tests as well as existing unit tests. It doesn't matter what class I'm importing from the<code>com.company.module1.foo</code>package. The editor shows errors for any class within that package and within that same module.
Also, note that I'm using the "Create JUnit Tests" context menu item within NetBeans 6.9 to get going on new unit tests. This is also how the original unit tests classes (under NB 6.7.1) were created. | java | netbeans | junit | null | null | null | open | NetBeans 6.9 and JUnit 4.8.2 package visibility problem
===
I recently upgraded from NetBeans 6.7.1 to NetBeans 6.9 and my old JUnit tests are showing "cannot find symbol" errors in the NetBeans editor around the import statements.
Everything builds correctly on these unit tests and I can still run/debug the unit tests without any issues. However, auto-complete within the editor doesn't work at all for the classes it can't find. This is making it difficult to create new JUnit tests.
I can import classes from another module within the suite correctly. Java API classes also import without issue. This seems like a dependency issue, but I don't know how to fix it.
Here's the hypothetical NetBeans project structure I'm running on:
<pre><code>MyCodeSuite
- MyNetBeansModule1
- - Source Packages
- - - com.company.module1.foo
- - - - DoSomething1
- - - - DoSomethingElse1
- - - - ClassInQuestion
- - Unit Test Packages
- - - com.company.module1.foo
- - - - ClassInQuestionTest
- MyNetBeansModule2
- - Source Packages
- - - com.company.module2.foo
- - - - DoSomething2
- - - - DoSomethingElse2
</code></pre>
ClassInQuestionTest.java:
<pre><code>package com.company.module1.foo;
import com.company.module1.foo.DoSomething1; // this is where the editor starts showing errors; these errors are propagated throughout the code anywhere "DoSomething1" shows up
import com.company.module2.foo.DoSomething2; // the editor doesn't complain for this one
// These imports all work correctly
import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
</code></pre>
I've duplicated this for new unit tests as well as existing unit tests. It doesn't matter what class I'm importing from the<code>com.company.module1.foo</code>package. The editor shows errors for any class within that package and within that same module.
Also, note that I'm using the "Create JUnit Tests" context menu item within NetBeans 6.9 to get going on new unit tests. This is also how the original unit tests classes (under NB 6.7.1) were created. | 0 |
6,285,694 | 06/08/2011 21:49:25 | 789,952 | 06/08/2011 21:49:25 | 1 | 0 | Uncaught TypeError: Property 'open' of object [object DOMWindow] is not a function | This is my code:
function loadOffer(id)
{
window.open("http://www.google.com.com","mywindow");
}
It's initiated onClick. However I get the following error:
Uncaught TypeError: Property 'open' of object [object DOMWindow] is not a function
Any ideas? | javascript | null | null | null | null | null | open | Uncaught TypeError: Property 'open' of object [object DOMWindow] is not a function
===
This is my code:
function loadOffer(id)
{
window.open("http://www.google.com.com","mywindow");
}
It's initiated onClick. However I get the following error:
Uncaught TypeError: Property 'open' of object [object DOMWindow] is not a function
Any ideas? | 0 |
9,853,513 | 03/24/2012 16:48:57 | 1,290,215 | 03/24/2012 16:41:34 | 1 | 0 | Simple web app with spring and jsf | I need to write simple web app which will connect with another server via rest's. There will be only presentation layer, I want this app only presents information from second server. And there are my questions:
1) any good tutorial about spring and jsf?
2) any example of such solution?
Feel free to correct me. | spring | jsf | rest | architecture | spring-mvc | 03/24/2012 19:48:14 | not a real question | Simple web app with spring and jsf
===
I need to write simple web app which will connect with another server via rest's. There will be only presentation layer, I want this app only presents information from second server. And there are my questions:
1) any good tutorial about spring and jsf?
2) any example of such solution?
Feel free to correct me. | 1 |
5,258,918 | 03/10/2011 11:16:57 | 653,416 | 03/10/2011 11:16:57 | 1 | 0 | Stuck for how to accomplish a task | Here's what I'd like to do: we have a list of members who need to be redirected to a series of forms on URLs. We have around 5 forms and 200members. They would be greeted at a site, enter their First and Last name and then be redirected to the applicable form which we selected for them. Starting from scratch with this so any hints as to process would be hugely appreciated. Thanks in advance! | java | php | null | null | null | 03/10/2011 11:32:43 | not a real question | Stuck for how to accomplish a task
===
Here's what I'd like to do: we have a list of members who need to be redirected to a series of forms on URLs. We have around 5 forms and 200members. They would be greeted at a site, enter their First and Last name and then be redirected to the applicable form which we selected for them. Starting from scratch with this so any hints as to process would be hugely appreciated. Thanks in advance! | 1 |
9,734,506 | 03/16/2012 09:13:37 | 1,033,305 | 11/07/2011 07:06:24 | 1 | 0 | unable to import java libraries | My simple java swing code is showing compile time error on the following code
import java.util.ArrayList;
import javax.swing.JLabel;
import java.io.File;
i.e. all java imports are showing error
I think code is fine, I tried reinstalling jre and jdk but it didn't helped, any help will be appreciated
THanks in advance
| java | jdk | jre | null | null | 03/16/2012 09:58:00 | not a real question | unable to import java libraries
===
My simple java swing code is showing compile time error on the following code
import java.util.ArrayList;
import javax.swing.JLabel;
import java.io.File;
i.e. all java imports are showing error
I think code is fine, I tried reinstalling jre and jdk but it didn't helped, any help will be appreciated
THanks in advance
| 1 |
10,489,200 | 05/07/2012 21:10:58 | 394,487 | 07/17/2010 05:12:03 | 4,981 | 131 | EzAPI OLE DB Destination | I've searched all over and I now have to ask SO. I'm trying to construct a simple dataflow using EzAPI. It's been anything but easy, but I'm committed to figuring this out. What I can't figure out is how to get the `EzOleDBDestination` working. Here's my complete code
var a = new Application();
// using a template since it's impossible to set up an ADO.NET connection to MySQL
// using EzAPI and potentially even with the raw SSIS API...
var pkg = new EzPackage(a.LoadPackage(@"C:\...\Package.dtsx", null));
pkg.Name = "Star";
var df = new EzDataFlow(pkg);
df.Name = "My DataFlow";
var src = new EzAdoNetSource(df);
src.Name = "Source Database";
src.SqlCommand = "SELECT * FROM enum_institution";
src.AccessMode = AccessMode.AM_SQLCOMMAND;
src.Connection = new EzConnectionManager(pkg, pkg.Connections["SourceDB"]);
src.ReinitializeMetaData();
var derived = new EzDerivedColumn(df);
derived.AttachTo(src);
derived.Name = "Prepare Dimension Attributes";
derived.LinkAllInputsToOutputs();
derived.Expression["SourceNumber"] = "id";
derived.Expression["Name"] = "(DT_STR,255,1252)description";
var dest = new EzOleDbDestination(df);
dest.AttachTo(derived, 0, 0);
dest.ReinitializeMetaData();
dest.Connection = new EzConnectionManager(pkg, pkg.Connections["TargetDB"]);
dest.Name = "Target Database";
// the next two lines don't work (throw COMException with error code 0xC0090001)
//dest.AccessMode = AccessMode.AM_OPENROWSET_FASTLOAD;
//dest.Table = "[dbo].[DimInstitution]";
dest.LinkAllInputsToOutputs();
// I use this instead of the above since they don't throw errors
dest.Comp.SetComponentProperty("OpenRowset", "[dbo].[DimInstitution]");
dest.Comp.SetComponentProperty("AccessMode", 3);
// I get an 0xC0090001 exception here
dest.MapColumn("Name", "Name");
dest.MapColumn("SourceNumber", "SourceNumber");
Basically, anything that involves calls to `ReinitializeMetadata()` results in 0xC0090001, because that method is where the error happens. There's no real documentation to help me, so I have to rely on any gurus here.
I should mention that the source DB is MySQL and the target DB is SQL Server. Building packages like this using the SSIS designer works fine, so I know it's possible.
Feel free to tell me if I'm doing anything else wrong. | c# | com | ssis | ezapi | null | null | open | EzAPI OLE DB Destination
===
I've searched all over and I now have to ask SO. I'm trying to construct a simple dataflow using EzAPI. It's been anything but easy, but I'm committed to figuring this out. What I can't figure out is how to get the `EzOleDBDestination` working. Here's my complete code
var a = new Application();
// using a template since it's impossible to set up an ADO.NET connection to MySQL
// using EzAPI and potentially even with the raw SSIS API...
var pkg = new EzPackage(a.LoadPackage(@"C:\...\Package.dtsx", null));
pkg.Name = "Star";
var df = new EzDataFlow(pkg);
df.Name = "My DataFlow";
var src = new EzAdoNetSource(df);
src.Name = "Source Database";
src.SqlCommand = "SELECT * FROM enum_institution";
src.AccessMode = AccessMode.AM_SQLCOMMAND;
src.Connection = new EzConnectionManager(pkg, pkg.Connections["SourceDB"]);
src.ReinitializeMetaData();
var derived = new EzDerivedColumn(df);
derived.AttachTo(src);
derived.Name = "Prepare Dimension Attributes";
derived.LinkAllInputsToOutputs();
derived.Expression["SourceNumber"] = "id";
derived.Expression["Name"] = "(DT_STR,255,1252)description";
var dest = new EzOleDbDestination(df);
dest.AttachTo(derived, 0, 0);
dest.ReinitializeMetaData();
dest.Connection = new EzConnectionManager(pkg, pkg.Connections["TargetDB"]);
dest.Name = "Target Database";
// the next two lines don't work (throw COMException with error code 0xC0090001)
//dest.AccessMode = AccessMode.AM_OPENROWSET_FASTLOAD;
//dest.Table = "[dbo].[DimInstitution]";
dest.LinkAllInputsToOutputs();
// I use this instead of the above since they don't throw errors
dest.Comp.SetComponentProperty("OpenRowset", "[dbo].[DimInstitution]");
dest.Comp.SetComponentProperty("AccessMode", 3);
// I get an 0xC0090001 exception here
dest.MapColumn("Name", "Name");
dest.MapColumn("SourceNumber", "SourceNumber");
Basically, anything that involves calls to `ReinitializeMetadata()` results in 0xC0090001, because that method is where the error happens. There's no real documentation to help me, so I have to rely on any gurus here.
I should mention that the source DB is MySQL and the target DB is SQL Server. Building packages like this using the SSIS designer works fine, so I know it's possible.
Feel free to tell me if I'm doing anything else wrong. | 0 |
8,937,619 | 01/20/2012 06:32:56 | 924,677 | 09/02/2011 05:34:23 | 303 | 12 | Site similar to Behance but for web dev projects? | This is probably a stupid question and in the wrong site, but couldn't think better.
Is there a site similar to the Behance Network, but aimed at web development, interactive stuff, etc? Every site I found was aimed specifically at design artists... | portfolio | null | null | null | null | 01/22/2012 01:00:50 | off topic | Site similar to Behance but for web dev projects?
===
This is probably a stupid question and in the wrong site, but couldn't think better.
Is there a site similar to the Behance Network, but aimed at web development, interactive stuff, etc? Every site I found was aimed specifically at design artists... | 2 |
11,170,729 | 06/23/2012 15:33:50 | 1,416,762 | 05/25/2012 07:06:43 | 5 | 0 | Android API Manual | I would like to make a manual of the android API's that can be used in other applications. For example a calender,contacts can be used in other application. So are there more API's like these which can be used in other apps where these apps as standalone are complete in itself...
Plz suggest where can I read about it.... | android | android-sdk-2.2 | null | null | null | 06/24/2012 15:15:11 | not a real question | Android API Manual
===
I would like to make a manual of the android API's that can be used in other applications. For example a calender,contacts can be used in other application. So are there more API's like these which can be used in other apps where these apps as standalone are complete in itself...
Plz suggest where can I read about it.... | 1 |
2,066,636 | 01/14/2010 18:46:13 | 149,045 | 08/01/2009 18:55:03 | 2,034 | 54 | open last modified file in the directory using vi | I want a quick way to open the last modified file in the directory, perhaps in a form of alias.
Currently, I do ls -ltr. Then copy-and-paste the filename
Assume that I am using tcsh | vi | bash | tcsh | null | null | null | open | open last modified file in the directory using vi
===
I want a quick way to open the last modified file in the directory, perhaps in a form of alias.
Currently, I do ls -ltr. Then copy-and-paste the filename
Assume that I am using tcsh | 0 |
7,238,513 | 08/30/2011 03:54:11 | 311,188 | 04/07/2010 16:44:08 | 106 | 0 | Why Python for web development? | I'm wondering if learning this language or not.
I've been 15 years mainly coding with PHP. I know C, C++, Java, Perl … but PHP has solved all of my problems for web development.
I've read carefully this: http://wiki.python.org/moin/PythonVsPhp
I find Python useful for sysadmin tasks for example, or for first programming language learning. Sincerely, I love its cleanliness and clarity (it's like a "Jquerized PHP") … but I'm still finding blogs defending Python for web development … Why ?
Can anyone explain me advantages of Python for web ?
| python | null | null | null | null | 08/30/2011 04:05:26 | not constructive | Why Python for web development?
===
I'm wondering if learning this language or not.
I've been 15 years mainly coding with PHP. I know C, C++, Java, Perl … but PHP has solved all of my problems for web development.
I've read carefully this: http://wiki.python.org/moin/PythonVsPhp
I find Python useful for sysadmin tasks for example, or for first programming language learning. Sincerely, I love its cleanliness and clarity (it's like a "Jquerized PHP") … but I'm still finding blogs defending Python for web development … Why ?
Can anyone explain me advantages of Python for web ?
| 4 |
10,902,591 | 06/05/2012 18:14:32 | 397,861 | 07/21/2010 11:27:16 | 24,159 | 1,513 | What to use to refactor the javascript / jQuery of a web application | i hope this question is not too general, my new task is the complete refactoring of the javascript of our wordpress plugin.
Our current code is standard jQuery code, thrown all into a file, with checks on the existance of dom elements to understand on what page we are in and attach the correct event handlers.
My goal is simply to write more manteinable and clear code, and introduce tests in the process.
My approach would be:
- Try to modularize code in separate files (one file for each page) and use require.js to load only the required code.
- write some tests with jasmine/sinon and try to adapt the esisting code so that the tests pass
Have you got any other suggestions/best practice?
Can you share some example on how you approached similar tasks?
I was thinking about bringing in an mvc framework but if i can stick to standard jQuery code i think it's easier for the development team because it doesn't add complexity
| javascript | jquery | refactoring | requirejs | null | 06/06/2012 08:42:24 | not constructive | What to use to refactor the javascript / jQuery of a web application
===
i hope this question is not too general, my new task is the complete refactoring of the javascript of our wordpress plugin.
Our current code is standard jQuery code, thrown all into a file, with checks on the existance of dom elements to understand on what page we are in and attach the correct event handlers.
My goal is simply to write more manteinable and clear code, and introduce tests in the process.
My approach would be:
- Try to modularize code in separate files (one file for each page) and use require.js to load only the required code.
- write some tests with jasmine/sinon and try to adapt the esisting code so that the tests pass
Have you got any other suggestions/best practice?
Can you share some example on how you approached similar tasks?
I was thinking about bringing in an mvc framework but if i can stick to standard jQuery code i think it's easier for the development team because it doesn't add complexity
| 4 |
8,804,977 | 01/10/2012 14:36:50 | 754,471 | 05/15/2011 12:52:22 | 41 | 6 | setInterval/clearInterval Spotify apps | Is is possible to use setInterval/clearInterval in spotify apps?
I've tried to do something like this: `int = setInterval(someFunction(), 1000);` but it only call `someFunction()` once, instead of once every second?
So I tried to do this: `int = setInterval("someFunction()", 1000);` and it actually works in some way, because it gives me this error `Uncaught ReferenceError: cAlarm is not defined` every second?
Why? D:
| spotify | null | null | null | null | null | open | setInterval/clearInterval Spotify apps
===
Is is possible to use setInterval/clearInterval in spotify apps?
I've tried to do something like this: `int = setInterval(someFunction(), 1000);` but it only call `someFunction()` once, instead of once every second?
So I tried to do this: `int = setInterval("someFunction()", 1000);` and it actually works in some way, because it gives me this error `Uncaught ReferenceError: cAlarm is not defined` every second?
Why? D:
| 0 |
9,943,881 | 03/30/2012 13:24:39 | 1,056,820 | 11/20/2011 21:16:28 | 6 | 1 | Sending Emails With JavaScript - Yes, JavaScript | I am creating a javascript function to send email. What it does is accept and object of parameters and a callback. It parses all the parameters and converts the callback function to a string. Then it creates a new script element with the source of a php page, with get parameters for all of the email parameters and the callback. The php then parses the parameters and sends the email. It then echo's out the callback function. Is there a logical error here?
Also, does anyone have a php and javascript regex for validating email addresses? | php | javascript | regex | email | null | 04/01/2012 01:33:42 | not constructive | Sending Emails With JavaScript - Yes, JavaScript
===
I am creating a javascript function to send email. What it does is accept and object of parameters and a callback. It parses all the parameters and converts the callback function to a string. Then it creates a new script element with the source of a php page, with get parameters for all of the email parameters and the callback. The php then parses the parameters and sends the email. It then echo's out the callback function. Is there a logical error here?
Also, does anyone have a php and javascript regex for validating email addresses? | 4 |
7,811,680 | 10/18/2011 18:04:16 | 765,836 | 05/23/2011 10:31:30 | 113 | 10 | What does CORS have to do with html5 | I have seen a lot of discussions that talk about html5 also talk a lot about Cross origin Resource sharing practices . I do not exactly understand the relationship between the two.Can somebody explain | javascript | html5 | null | null | null | 10/31/2011 02:57:36 | not constructive | What does CORS have to do with html5
===
I have seen a lot of discussions that talk about html5 also talk a lot about Cross origin Resource sharing practices . I do not exactly understand the relationship between the two.Can somebody explain | 4 |
7,735,680 | 10/12/2011 05:31:48 | 990,786 | 10/12/2011 05:26:21 | 1 | 0 | nodejs payment gateway integration | i am trying to integrate ccavenues payment gateway for a nodejs application. currently no support exists on node for this. can I use ruby library like activemerchant in conjunctionmwith nodejs. here i am confused between redis as a client or beanstalkd | node.js | redis | beanstalkd | ccavenue | null | 10/18/2011 08:34:01 | not a real question | nodejs payment gateway integration
===
i am trying to integrate ccavenues payment gateway for a nodejs application. currently no support exists on node for this. can I use ruby library like activemerchant in conjunctionmwith nodejs. here i am confused between redis as a client or beanstalkd | 1 |
1,421,002 | 09/14/2009 11:29:31 | 85,161 | 03/31/2009 15:01:20 | 40 | 4 | getting the name of the calling method | Basically i've got a web service that i'm trying to put some kind of usage logging in.
To do this i've created a class with a logging method.
I instatiate the class on the service and then call the logging method in each of the web methods.
I'm trying to find a way of getting the name of the method that has called the loggong method
Public sub tstmethod
log_object.log_method
end sub
in this case the returned name i'm looking for is "tstmethod"
Everywhere i've seen has said to either use
Dim stackframe As New Diagnostics.StackFrame
Return stackframe.GetMethod.Name.ToString
Or to use
Dim stackframe As New Diagnostics.StackFrame
Return stackframe.GetMethod.DeclaringType.FullName
which i call inside the logging method
getmethod.name.tostring returns the name of the logging method
getmethod.declaringtype.fullname returns the name of the logging class
no matter what i do i cannot find a way of getting the name of the method that called the logging method in this case "tstmethod" | vb.net | reflection | null | null | null | null | open | getting the name of the calling method
===
Basically i've got a web service that i'm trying to put some kind of usage logging in.
To do this i've created a class with a logging method.
I instatiate the class on the service and then call the logging method in each of the web methods.
I'm trying to find a way of getting the name of the method that has called the loggong method
Public sub tstmethod
log_object.log_method
end sub
in this case the returned name i'm looking for is "tstmethod"
Everywhere i've seen has said to either use
Dim stackframe As New Diagnostics.StackFrame
Return stackframe.GetMethod.Name.ToString
Or to use
Dim stackframe As New Diagnostics.StackFrame
Return stackframe.GetMethod.DeclaringType.FullName
which i call inside the logging method
getmethod.name.tostring returns the name of the logging method
getmethod.declaringtype.fullname returns the name of the logging class
no matter what i do i cannot find a way of getting the name of the method that called the logging method in this case "tstmethod" | 0 |
10,570,085 | 05/13/2012 07:43:53 | 1,130,897 | 01/04/2012 21:53:37 | 3 | 0 | plotting Google Map from ASP.Net | I am trying to plot map from ASP.NET project and I have found a good tutorial [here][1]
.
http://www.codeproject.com/Articles/175557/Plot-Path-using-Google-Maps-JavaScript-API
The project compiles fine abut I still can not load the map .
From a previous post [andrew][2] has pointed out using my own css which did not work for me .
Need help with it .
Source code is available on the site :).
[1]: http://www.codeproject.com/Articles/175557/Plot-Path-using-Google-Maps-JavaScript-API
[2]: http://stackoverflow.com/questions/10546818/google-maps-v3-polyline-loading-fails | asp.net | css | ajax | google-maps | null | null | open | plotting Google Map from ASP.Net
===
I am trying to plot map from ASP.NET project and I have found a good tutorial [here][1]
.
http://www.codeproject.com/Articles/175557/Plot-Path-using-Google-Maps-JavaScript-API
The project compiles fine abut I still can not load the map .
From a previous post [andrew][2] has pointed out using my own css which did not work for me .
Need help with it .
Source code is available on the site :).
[1]: http://www.codeproject.com/Articles/175557/Plot-Path-using-Google-Maps-JavaScript-API
[2]: http://stackoverflow.com/questions/10546818/google-maps-v3-polyline-loading-fails | 0 |
4,542,600 | 12/27/2010 23:29:01 | 28,760 | 10/16/2008 22:36:00 | 4,035 | 161 | Interview question: remove duplicates from an unsorted linked list | I'm reading [Cracking the Coding Interview, Fourth Edition: 150 Programming Interview Questions and Solutions][1] and I'm trying to solve the following question:
> 2.1 Write code to remove duplicates from an unsorted linked list. FOLLOW
> UP: How would you solve this problem if
> a temporary buffer is not allowed?
I'm solving it in C#, so I made my own `Node` class:
public class Node<T> where T : class
{
public Node<T> Next { get; set; }
public T Value { get; set; }
public Node(T value)
{
Next = null;
Value = value;
}
}
My solution is to iterate through the list, then for each node to iterated through the remainder of the list and remove any duplicates (note that I haven't actually compiled or tested this, as instructed by the book):
public void RemoveDuplicates(Node<T> head)
{
// Iterate through the list
Node<T> iter = head;
while(iter != null)
{
// Iterate to the remaining nodes in the list
Node<T> current = iter;
while(current.Next != null)
{
if(iter.Value == current.Next.Value)
{
current.Next = current.Next.Next;
}
// move along the list
current = current.Next;
}
// move along the list
iter = iter.Next;
}
}
Here is the solution from the book (the author wrote it in java):
> Without a buffer, we can iterate with
> two pointers: “current” does a normal
> iteration, while “runner” iterates
> through all prior nodes to check for
> dups. Runner will only see one dup per
> node, because if there were multiple
> duplicates they would have been
> removed already.
public static void deleteDups2(LinkedListNode head)
{
if (head == null) return;
LinkedListNode previous = head;
LinkedListNode current = previous.next;
while (current != null)
{
LinkedListNode runner = head;
while (runner != current) { // Check for earlier dups
if (runner.data == current.data)
{
LinkedListNode tmp = current.next; // remove current
previous.next = tmp;
current = tmp; // update current to next node
break; // all other dups have already been removed
}
runner = runner.next;
}
if (runner == current) { // current not updated - update now
previous = current;
current = current.next;
}
}
}
So my solution always looks for duplicates for the current node to the end, while their solution looks for duplicates from the head to the current node. I feel like both solutions would suffer performance issues depending on how many duplicates there are in the list and how they're distributed (density and position). But in general: is my answer nearly as good as the one in the book or is it significantly worse?
[1]: http://www.amazon.com/Cracking-Coding-Interview-Fourth-Programming/dp/145157827X | c# | java | books | interview-questions | linked-list | null | open | Interview question: remove duplicates from an unsorted linked list
===
I'm reading [Cracking the Coding Interview, Fourth Edition: 150 Programming Interview Questions and Solutions][1] and I'm trying to solve the following question:
> 2.1 Write code to remove duplicates from an unsorted linked list. FOLLOW
> UP: How would you solve this problem if
> a temporary buffer is not allowed?
I'm solving it in C#, so I made my own `Node` class:
public class Node<T> where T : class
{
public Node<T> Next { get; set; }
public T Value { get; set; }
public Node(T value)
{
Next = null;
Value = value;
}
}
My solution is to iterate through the list, then for each node to iterated through the remainder of the list and remove any duplicates (note that I haven't actually compiled or tested this, as instructed by the book):
public void RemoveDuplicates(Node<T> head)
{
// Iterate through the list
Node<T> iter = head;
while(iter != null)
{
// Iterate to the remaining nodes in the list
Node<T> current = iter;
while(current.Next != null)
{
if(iter.Value == current.Next.Value)
{
current.Next = current.Next.Next;
}
// move along the list
current = current.Next;
}
// move along the list
iter = iter.Next;
}
}
Here is the solution from the book (the author wrote it in java):
> Without a buffer, we can iterate with
> two pointers: “current” does a normal
> iteration, while “runner” iterates
> through all prior nodes to check for
> dups. Runner will only see one dup per
> node, because if there were multiple
> duplicates they would have been
> removed already.
public static void deleteDups2(LinkedListNode head)
{
if (head == null) return;
LinkedListNode previous = head;
LinkedListNode current = previous.next;
while (current != null)
{
LinkedListNode runner = head;
while (runner != current) { // Check for earlier dups
if (runner.data == current.data)
{
LinkedListNode tmp = current.next; // remove current
previous.next = tmp;
current = tmp; // update current to next node
break; // all other dups have already been removed
}
runner = runner.next;
}
if (runner == current) { // current not updated - update now
previous = current;
current = current.next;
}
}
}
So my solution always looks for duplicates for the current node to the end, while their solution looks for duplicates from the head to the current node. I feel like both solutions would suffer performance issues depending on how many duplicates there are in the list and how they're distributed (density and position). But in general: is my answer nearly as good as the one in the book or is it significantly worse?
[1]: http://www.amazon.com/Cracking-Coding-Interview-Fourth-Programming/dp/145157827X | 0 |
6,537,673 | 06/30/2011 16:01:04 | 526,390 | 12/01/2010 10:14:21 | 83 | 4 | Is there an online code editor for Ruby on Rails ? | Is there an online code editor for Ruby on Rails ?
To directly edit files on the server ? | ruby-on-rails | null | null | null | null | 07/01/2011 03:45:04 | not a real question | Is there an online code editor for Ruby on Rails ?
===
Is there an online code editor for Ruby on Rails ?
To directly edit files on the server ? | 1 |
3,397,021 | 08/03/2010 13:38:59 | 296,516 | 03/18/2010 12:56:50 | 144 | 4 | PHP won't echo out or execute JavaScript. | I need PHP to open up a new window with a text from a variable.
Here's what I tried.
echo "<script>
$myWin=window.open('','$myWin','menubar,scrollbars,left=30px,top=40px,height=800px,width=800px');
$myWin.document.write(".$logtext.");
</script>";
}
but it doesn't work. any better ideas or suggestions? Thanks! :) | php | javascript | null | null | null | 08/03/2010 22:18:34 | not a real question | PHP won't echo out or execute JavaScript.
===
I need PHP to open up a new window with a text from a variable.
Here's what I tried.
echo "<script>
$myWin=window.open('','$myWin','menubar,scrollbars,left=30px,top=40px,height=800px,width=800px');
$myWin.document.write(".$logtext.");
</script>";
}
but it doesn't work. any better ideas or suggestions? Thanks! :) | 1 |
5,582,842 | 04/07/2011 14:38:10 | 232,271 | 12/15/2009 17:00:49 | 6 | 1 | Asynchronous Serialization for Winform Optimization | I'd like to do something like AJAX for our Winforms apps to optimize data delivery. I'd also like to cache info about user behavior (frequently used, recently used, etc.).
[Juval Lowy's ideas on component architecture][1] and serialization got me pretty excited when I was a newbie to C#, but where the rubber meets the road I'm one guy in a small company: overly elaborate solutions can get me in trouble and code reuse can be a simple as the Windows clipboard.
What authors, design patterns, or cautionary tales should I consider?
[1]: http://bit.ly/fxWoKP | c# | .net | winforms | optimization | xml-serialization | null | open | Asynchronous Serialization for Winform Optimization
===
I'd like to do something like AJAX for our Winforms apps to optimize data delivery. I'd also like to cache info about user behavior (frequently used, recently used, etc.).
[Juval Lowy's ideas on component architecture][1] and serialization got me pretty excited when I was a newbie to C#, but where the rubber meets the road I'm one guy in a small company: overly elaborate solutions can get me in trouble and code reuse can be a simple as the Windows clipboard.
What authors, design patterns, or cautionary tales should I consider?
[1]: http://bit.ly/fxWoKP | 0 |
4,461,182 | 12/16/2010 13:26:16 | 251,840 | 01/15/2010 20:17:58 | 70 | 5 | Kannel not receiving messages from Huwaei E160 modem | I've connected a Huawei E160 Modem to my Ubuntu box. Set up kannel properly, the conf file is below:
#CORE STUFF
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
status-password = foo
#admin-deny-ip = ""
#admin-allow-ip = ""
#log-file = "/var/log/kannel.log"
#log-level = 0
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
dlr-storage=mysql
#access-log = "access.log"
#store-file = " kannel.store"
group = smsc
smsc = at
modemtype = huawei
device = /dev/ttyUSB1
#speed = 115200
#speed = 9600
#pin = 2345
connect-allow-ip = 127.0.0.1
group = modems
id = huawei
name = "huawei-e160"
detect-string = "huawei"
#init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
init-string = "AT+CNMI=2,0,0,2,0"
#init-string = "AT+CPMS=ME"
#init-string = "AT+CMGL=ALL"
message-storage = sm
speed = 115200
# SMSBOX SETUP
group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
global-sender = 13013
sendsms-chars = "0123456789 +-"
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
access-log = "/var/log/kannel/access.log"
# SEND-SMS USERS
group = sendsms-user
username = kannel
password = kannel
concatenation = true
max-messages = 3
# SERVICES
# there should be default always
group=sms-service
keyword=default
text="Love Kannel hate PyGSM"
#DATABASE STUFF
group=mysql-connection
id=mydlr
host=localhost
username=root
password=xxxx
database=kannel_dev
port=3306
max-connections=1
group=dlr-db
id=mydlr
table=dlr
field-smsc=smsc
field-timestamp=ts
field-destination=destination
field-source=source
field-service=service
field-url=url
field-mask=mask
field-status=status
field-boxc-id=boxc
When I run bearerbox using "bearerbox -v 0 /etc/kannel/kannel.conf" Kannel connects just fine:
2010-12-16 15:45:06 [1979] [0] INFO: Debug_lvl = 0, log_file = <none>, log_lvl = 0
2010-12-16 15:45:06 [1979] [0] INFO: MYSQL: Connected to server at localhost.
2010-12-16 15:45:06 [1979] [0] INFO: MYSQL: server version 5.1.49-1ubuntu8.1, client version 5.1.49.
2010-12-16 15:45:06 [1979] [0] INFO: DLR using storage type: mysql
2010-12-16 15:45:06 [1979] [0] DEBUG: Kannel bearerbox version `1.4.3'.
Build `Jun 15 2010 10:41:45', compiler `4.4.4'.
System Linux, release 2.6.35-22-generic, version #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010, machine i686.
Hostname techadvisor2, IP 10.0.2.15.
Libxml version 2.7.7.
Using OpenSSL 0.9.8o 01 Jun 2010.
Compiled with MySQL 5.1.47, using MySQL 5.1.49.
Using SQLite 3.6.23.1.
Using native malloc.
2010-12-16 15:45:06 [1979] [0] INFO: Added logfile `/var/log/kannel/bearerbox.log' with level `0'.
2010-12-16 15:45:06 [1979] [0] INFO: HTTP: Opening server at port 13000.
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 2 (gwlib/http.c:server_thread)
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 3 (gw/bb_http.c:httpadmin_run)
2010-12-16 15:45:06 [1979] [0] DEBUG: starting smsbox connection module
2010-12-16 15:45:06 [1979] [0] INFO: BOXC: 'smsbox-max-pending' not set, using default (100).
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 4 (gw/bb_boxc.c:sms_to_smsboxes)
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 5 (gw/bb_boxc.c:smsboxc_run)
2010-12-16 15:45:06 [1979] [0] INFO: Set SMS resend frequency to 60 seconds.
2010-12-16 15:45:06 [1979] [0] INFO: SMS resend retry set to unlimited.
2010-12-16 15:45:06 [1979] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) maps to pid 1979.
2010-12-16 15:45:06 [1979] [0] DEBUG: smsbox MO concatenated message handling enabled
2010-12-16 15:45:06 [1979] [0] INFO: DLR rerouting for smsc id <(null)> disabled.
2010-12-16 15:45:06 [1979] [0] INFO: AT2[/dev/ttyUSB1]: configuration shows modemtype <huawei>
2010-12-16 15:45:06 [1979] [0] DEBUG: AT2[/dev/ttyUSB1]: Reading modem definitions from </etc/kannel/kannel.conf>
2010-12-16 15:45:06 [1979] [0] DEBUG: AT2[/dev/ttyUSB1]: Found <1> modems in config
2010-12-16 15:45:06 [1979] [0] INFO: AT2[/dev/ttyUSB1]: read modem definition for <huawei-e160>
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 6 (gw/smsc/smsc_at.c:at2_device_thread)
2010-12-16 15:45:06 [1979] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 1979.
2010-12-16 15:45:06 [1979] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) maps to pid 1979.
2010-12-16 15:45:06 [1979] [4] DEBUG: Thread 4 (gw/bb_boxc.c:sms_to_smsboxes) maps to pid 1979.
2010-12-16 15:45:06 [1979] [5] DEBUG: Thread 5 (gw/bb_boxc.c:smsboxc_run) maps to pid 1979.
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 7 (gw/bb_smscconn.c:sms_router)
2010-12-16 15:45:06 [1979] [0] INFO: ----------------------------------------
2010-12-16 15:45:06 [1979] [0] INFO: Kannel bearerbox II version 1.4.3 starting
2010-12-16 15:45:06 [1979] [0] INFO: MAIN: Start-up done, entering mainloop
2010-12-16 15:45:06 [1979] [0] DEBUG: AT2[/dev/ttyUSB1]: start called
2010-12-16 15:45:06 [1979] [6] DEBUG: Thread 6 (gw/smsc/smsc_at.c:at2_device_thread) maps to pid 1979.
2010-12-16 15:45:06 [1979] [6] INFO: AT2[/dev/ttyUSB1]: trying to use speed <115200> from modem definition
2010-12-16 15:45:06 [1979] [6] INFO: AT2[/dev/ttyUSB1]: opening device
2010-12-16 15:45:06 [1979] [7] DEBUG: Thread 7 (gw/bb_smscconn.c:sms_router) maps to pid 1979.
2010-12-16 15:45:11 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: device opened. Telnet mode = 0
2010-12-16 15:45:16 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: device opened
2010-12-16 15:45:16 [1979] [6] INFO: AT2[/dev/ttyUSB1]: speed set to 115200
2010-12-16 15:45:16 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> ^M
2010-12-16 15:45:18 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT^M
2010-12-16 15:45:22 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT^M
2010-12-16 15:45:22 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:22 [1979] [6] INFO: AT2[/dev/ttyUSB1]: Closing device
2010-12-16 15:45:22 [1979] [6] INFO: AT2[/dev/ttyUSB1]: speed is 115200
2010-12-16 15:45:22 [1979] [6] INFO: AT2[/dev/ttyUSB1]: opening device
2010-12-16 15:45:22 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: device opened. Telnet mode = 0
2010-12-16 15:45:22 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: device opened
2010-12-16 15:45:22 [1979] [6] INFO: AT2[/dev/ttyUSB1]: Logging in
2010-12-16 15:45:22 [1979] [6] INFO: AT2[/dev/ttyUSB1]: init device
2010-12-16 15:45:22 [1979] [6] INFO: AT2[/dev/ttyUSB1]: speed set to 115200
2010-12-16 15:45:22 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> ATZ^M
2010-12-16 15:45:26 [1979] [6] ERROR: AT2[/dev/ttyUSB1]: Wrong or no answer to ATZ, ignoring
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- AT
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT&F^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- AT&F
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> ATE0^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- ATE0
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT+IFC=2,2^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT+CPIN?^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- +CPIN: READY
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT+CMGF=0^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT+CSMS=?^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- +CSMS: (0-1)
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT+CNMI=2,0,0,2,0^M
2010-12-16 15:45:27 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:27 [1979] [6] INFO: AT2[/dev/ttyUSB1]: AT SMSC successfully opened.
I send an SMS to the modem, and nothing is received. I've checked the log files and there's no error message of any kind. I tested the modem on a windows 7 machine and it works just fine. Any idea what could be the problem? | kannel | null | null | null | null | 12/16/2010 14:06:45 | off topic | Kannel not receiving messages from Huwaei E160 modem
===
I've connected a Huawei E160 Modem to my Ubuntu box. Set up kannel properly, the conf file is below:
#CORE STUFF
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
status-password = foo
#admin-deny-ip = ""
#admin-allow-ip = ""
#log-file = "/var/log/kannel.log"
#log-level = 0
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
dlr-storage=mysql
#access-log = "access.log"
#store-file = " kannel.store"
group = smsc
smsc = at
modemtype = huawei
device = /dev/ttyUSB1
#speed = 115200
#speed = 9600
#pin = 2345
connect-allow-ip = 127.0.0.1
group = modems
id = huawei
name = "huawei-e160"
detect-string = "huawei"
#init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
init-string = "AT+CNMI=2,0,0,2,0"
#init-string = "AT+CPMS=ME"
#init-string = "AT+CMGL=ALL"
message-storage = sm
speed = 115200
# SMSBOX SETUP
group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
global-sender = 13013
sendsms-chars = "0123456789 +-"
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
access-log = "/var/log/kannel/access.log"
# SEND-SMS USERS
group = sendsms-user
username = kannel
password = kannel
concatenation = true
max-messages = 3
# SERVICES
# there should be default always
group=sms-service
keyword=default
text="Love Kannel hate PyGSM"
#DATABASE STUFF
group=mysql-connection
id=mydlr
host=localhost
username=root
password=xxxx
database=kannel_dev
port=3306
max-connections=1
group=dlr-db
id=mydlr
table=dlr
field-smsc=smsc
field-timestamp=ts
field-destination=destination
field-source=source
field-service=service
field-url=url
field-mask=mask
field-status=status
field-boxc-id=boxc
When I run bearerbox using "bearerbox -v 0 /etc/kannel/kannel.conf" Kannel connects just fine:
2010-12-16 15:45:06 [1979] [0] INFO: Debug_lvl = 0, log_file = <none>, log_lvl = 0
2010-12-16 15:45:06 [1979] [0] INFO: MYSQL: Connected to server at localhost.
2010-12-16 15:45:06 [1979] [0] INFO: MYSQL: server version 5.1.49-1ubuntu8.1, client version 5.1.49.
2010-12-16 15:45:06 [1979] [0] INFO: DLR using storage type: mysql
2010-12-16 15:45:06 [1979] [0] DEBUG: Kannel bearerbox version `1.4.3'.
Build `Jun 15 2010 10:41:45', compiler `4.4.4'.
System Linux, release 2.6.35-22-generic, version #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010, machine i686.
Hostname techadvisor2, IP 10.0.2.15.
Libxml version 2.7.7.
Using OpenSSL 0.9.8o 01 Jun 2010.
Compiled with MySQL 5.1.47, using MySQL 5.1.49.
Using SQLite 3.6.23.1.
Using native malloc.
2010-12-16 15:45:06 [1979] [0] INFO: Added logfile `/var/log/kannel/bearerbox.log' with level `0'.
2010-12-16 15:45:06 [1979] [0] INFO: HTTP: Opening server at port 13000.
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 2 (gwlib/http.c:server_thread)
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 3 (gw/bb_http.c:httpadmin_run)
2010-12-16 15:45:06 [1979] [0] DEBUG: starting smsbox connection module
2010-12-16 15:45:06 [1979] [0] INFO: BOXC: 'smsbox-max-pending' not set, using default (100).
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 4 (gw/bb_boxc.c:sms_to_smsboxes)
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 5 (gw/bb_boxc.c:smsboxc_run)
2010-12-16 15:45:06 [1979] [0] INFO: Set SMS resend frequency to 60 seconds.
2010-12-16 15:45:06 [1979] [0] INFO: SMS resend retry set to unlimited.
2010-12-16 15:45:06 [1979] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) maps to pid 1979.
2010-12-16 15:45:06 [1979] [0] DEBUG: smsbox MO concatenated message handling enabled
2010-12-16 15:45:06 [1979] [0] INFO: DLR rerouting for smsc id <(null)> disabled.
2010-12-16 15:45:06 [1979] [0] INFO: AT2[/dev/ttyUSB1]: configuration shows modemtype <huawei>
2010-12-16 15:45:06 [1979] [0] DEBUG: AT2[/dev/ttyUSB1]: Reading modem definitions from </etc/kannel/kannel.conf>
2010-12-16 15:45:06 [1979] [0] DEBUG: AT2[/dev/ttyUSB1]: Found <1> modems in config
2010-12-16 15:45:06 [1979] [0] INFO: AT2[/dev/ttyUSB1]: read modem definition for <huawei-e160>
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 6 (gw/smsc/smsc_at.c:at2_device_thread)
2010-12-16 15:45:06 [1979] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 1979.
2010-12-16 15:45:06 [1979] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) maps to pid 1979.
2010-12-16 15:45:06 [1979] [4] DEBUG: Thread 4 (gw/bb_boxc.c:sms_to_smsboxes) maps to pid 1979.
2010-12-16 15:45:06 [1979] [5] DEBUG: Thread 5 (gw/bb_boxc.c:smsboxc_run) maps to pid 1979.
2010-12-16 15:45:06 [1979] [0] DEBUG: Started thread 7 (gw/bb_smscconn.c:sms_router)
2010-12-16 15:45:06 [1979] [0] INFO: ----------------------------------------
2010-12-16 15:45:06 [1979] [0] INFO: Kannel bearerbox II version 1.4.3 starting
2010-12-16 15:45:06 [1979] [0] INFO: MAIN: Start-up done, entering mainloop
2010-12-16 15:45:06 [1979] [0] DEBUG: AT2[/dev/ttyUSB1]: start called
2010-12-16 15:45:06 [1979] [6] DEBUG: Thread 6 (gw/smsc/smsc_at.c:at2_device_thread) maps to pid 1979.
2010-12-16 15:45:06 [1979] [6] INFO: AT2[/dev/ttyUSB1]: trying to use speed <115200> from modem definition
2010-12-16 15:45:06 [1979] [6] INFO: AT2[/dev/ttyUSB1]: opening device
2010-12-16 15:45:06 [1979] [7] DEBUG: Thread 7 (gw/bb_smscconn.c:sms_router) maps to pid 1979.
2010-12-16 15:45:11 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: device opened. Telnet mode = 0
2010-12-16 15:45:16 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: device opened
2010-12-16 15:45:16 [1979] [6] INFO: AT2[/dev/ttyUSB1]: speed set to 115200
2010-12-16 15:45:16 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> ^M
2010-12-16 15:45:18 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT^M
2010-12-16 15:45:22 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT^M
2010-12-16 15:45:22 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:22 [1979] [6] INFO: AT2[/dev/ttyUSB1]: Closing device
2010-12-16 15:45:22 [1979] [6] INFO: AT2[/dev/ttyUSB1]: speed is 115200
2010-12-16 15:45:22 [1979] [6] INFO: AT2[/dev/ttyUSB1]: opening device
2010-12-16 15:45:22 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: device opened. Telnet mode = 0
2010-12-16 15:45:22 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: device opened
2010-12-16 15:45:22 [1979] [6] INFO: AT2[/dev/ttyUSB1]: Logging in
2010-12-16 15:45:22 [1979] [6] INFO: AT2[/dev/ttyUSB1]: init device
2010-12-16 15:45:22 [1979] [6] INFO: AT2[/dev/ttyUSB1]: speed set to 115200
2010-12-16 15:45:22 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> ATZ^M
2010-12-16 15:45:26 [1979] [6] ERROR: AT2[/dev/ttyUSB1]: Wrong or no answer to ATZ, ignoring
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- AT
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT&F^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- AT&F
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> ATE0^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- ATE0
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT+IFC=2,2^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT+CPIN?^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- +CPIN: READY
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT+CMGF=0^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT+CSMS=?^M
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- +CSMS: (0-1)
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:26 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: --> AT+CNMI=2,0,0,2,0^M
2010-12-16 15:45:27 [1979] [6] DEBUG: AT2[/dev/ttyUSB1]: <-- OK
2010-12-16 15:45:27 [1979] [6] INFO: AT2[/dev/ttyUSB1]: AT SMSC successfully opened.
I send an SMS to the modem, and nothing is received. I've checked the log files and there's no error message of any kind. I tested the modem on a windows 7 machine and it works just fine. Any idea what could be the problem? | 2 |
9,873,528 | 03/26/2012 14:00:13 | 1,293,184 | 03/26/2012 13:55:21 | 1 | 0 | InfoPath Error in a different region | Hi one of our client in China is getting this error when he opens infoPath form:
"If you want to use this format, data should be connected to original data once format is loaded. For this connection now can not use anyone. This format can not be opened by designer’s direction"
If anyone has been through this error before please advice..
Noman
| sharepoint2010 | infopath2010 | null | null | null | 03/26/2012 19:02:28 | off topic | InfoPath Error in a different region
===
Hi one of our client in China is getting this error when he opens infoPath form:
"If you want to use this format, data should be connected to original data once format is loaded. For this connection now can not use anyone. This format can not be opened by designer’s direction"
If anyone has been through this error before please advice..
Noman
| 2 |
8,783,942 | 01/09/2012 04:31:06 | 1,134,480 | 01/06/2012 14:25:53 | 1 | 0 | [Cant Add Row To Dataset] |
Private Function LoadtoDataset(ByVal _type As String)
Try
Dim ds As New DSProducts
Dim dr As DataRow
dr = ds.Tables("DailyTransaction").NewRow
dr("ProductCode") = ProdID
dr("ProductName") = lblProductName.Text
dr("Quantity") = txtQuantity.Text
dr("Type") = _type
ds.Tables("DailyTransaction").Rows.Add(dr)
Me.DialogResult = Windows.Forms.DialogResult.OK
'Me.Close()
Catch ex As Exception
MessageBox.Show(ex.Message.ToString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End Try
Return Nothing
End Function
this code works fine but when i use the dataset as datasource in a grid
nothing displays | .net | null | null | null | null | 02/20/2012 19:08:13 | not a real question | [Cant Add Row To Dataset]
===
Private Function LoadtoDataset(ByVal _type As String)
Try
Dim ds As New DSProducts
Dim dr As DataRow
dr = ds.Tables("DailyTransaction").NewRow
dr("ProductCode") = ProdID
dr("ProductName") = lblProductName.Text
dr("Quantity") = txtQuantity.Text
dr("Type") = _type
ds.Tables("DailyTransaction").Rows.Add(dr)
Me.DialogResult = Windows.Forms.DialogResult.OK
'Me.Close()
Catch ex As Exception
MessageBox.Show(ex.Message.ToString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End Try
Return Nothing
End Function
this code works fine but when i use the dataset as datasource in a grid
nothing displays | 1 |
7,990,655 | 11/03/2011 05:29:42 | 648,927 | 01/21/2011 21:44:27 | 777 | 3 | Line between current Python implementations and Compiled Languages | My understanding
C++ is compiled into machine code and executed.
Python is compiled into bytecode
This bytecode is then executed
What does this execution step entail and how is it different for Cpython and PyPy?
Where does the difference in performance kick in?
Where does the fact that Python is dynamically typed kick in in terms of performance?
Thanks! | c++ | python | compiler | cpython | pypy | 11/03/2011 07:18:08 | not a real question | Line between current Python implementations and Compiled Languages
===
My understanding
C++ is compiled into machine code and executed.
Python is compiled into bytecode
This bytecode is then executed
What does this execution step entail and how is it different for Cpython and PyPy?
Where does the difference in performance kick in?
Where does the fact that Python is dynamically typed kick in in terms of performance?
Thanks! | 1 |
8,917,626 | 01/18/2012 21:22:35 | 61,439 | 02/02/2009 09:55:12 | 5,873 | 204 | Why does this PHP method declaration not recognize the namespace of the type hint? | I'm trying to write a library based on [Doctrine Extensions][1], which provides this interface:
<!-- language-all: lang-php -->
namespace Gedmo\Mapping;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
interface Driver {
public function readExtendedMetadata(ClassMetadata $meta, array &$config);
public function setOriginalDriver($driver);
}
In my own code I implement this interface:
namespace Avit\Schedulable\Mapping\Driver;
use Gedmo\Mapping\Driver,
Doctrine\Common\Persistence\Mapping\ClassMetadata,
Doctrine\Common\Annotations\AnnotationReader,
class Annotation implements Driver {
public function readExtendedMetadata(ClassMetadata $meta, array &$config) {
// my implementation
}
}
The error I get says: **Declaration of Avit\Schedulable\Mapping\Driver\Annotation::readExtendedMetadata() must be compatible with that of Gedmo\Mapping\Driver::readExtendedMetadata()**
I can avoid the error if I remove the `ClassMetadata` type hint on my method.
I've googled some information that says this error happens when the namespace is mismatched. This makes sense since I'm declaring this class in my own namespace, however, I'm aliasing the same Doctrine namespace for `ClassMetadata` that the original `Driver` interface uses.
Why is the type hint not recognized?
[1]: https://github.com/l3pp4rd/DoctrineExtensions | php | interface | namespaces | php-5.3 | null | null | open | Why does this PHP method declaration not recognize the namespace of the type hint?
===
I'm trying to write a library based on [Doctrine Extensions][1], which provides this interface:
<!-- language-all: lang-php -->
namespace Gedmo\Mapping;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
interface Driver {
public function readExtendedMetadata(ClassMetadata $meta, array &$config);
public function setOriginalDriver($driver);
}
In my own code I implement this interface:
namespace Avit\Schedulable\Mapping\Driver;
use Gedmo\Mapping\Driver,
Doctrine\Common\Persistence\Mapping\ClassMetadata,
Doctrine\Common\Annotations\AnnotationReader,
class Annotation implements Driver {
public function readExtendedMetadata(ClassMetadata $meta, array &$config) {
// my implementation
}
}
The error I get says: **Declaration of Avit\Schedulable\Mapping\Driver\Annotation::readExtendedMetadata() must be compatible with that of Gedmo\Mapping\Driver::readExtendedMetadata()**
I can avoid the error if I remove the `ClassMetadata` type hint on my method.
I've googled some information that says this error happens when the namespace is mismatched. This makes sense since I'm declaring this class in my own namespace, however, I'm aliasing the same Doctrine namespace for `ClassMetadata` that the original `Driver` interface uses.
Why is the type hint not recognized?
[1]: https://github.com/l3pp4rd/DoctrineExtensions | 0 |
10,627,107 | 05/16/2012 21:41:17 | 1,243,905 | 03/01/2012 22:49:30 | 148 | 12 | Deploying and running a war file | (Please see the code Code below) I am able to run it on Tomcat in the eclipse environment and it works as it should.
I have exported the following to a war file and created a Manifest.MF with:
Manifest-Version: 1.0
Main-Class: com.process.Test
When the code is ran in Eclipse the response from there server side is output to a console.
Now finally my question (Pardon my ignorance, I am fairly new to this):
**Once the war is deployed on my Tomcat server, how do I send a REST request or run the war and display the server response?**
What is the equivalent to :http://localhost:8080/rest/xml/list on a live server?
Client side code:
import java.net.URI;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriBuilder;
import com.sun.jersey.api.client.Client;
//import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.config.ClientConfig;
import com.sun.jersey.api.client.config.DefaultClientConfig;
public class Test
{
public static void main(String[] args) {
//Instead on using Apache Client
//used default Jersey client
//to send requests
ClientConfig config = new DefaultClientConfig();
Client client = Client.create(config);
String _package = "api.amebatv.com";
WebResource service = client.resource(getBaseURI(_package));
//runRequest(service,"indexpath");
runRequest(service,"list");
}
/*
* For testing purposes the base URI is :http://localhost:8080/package name
* Will change to domain name for production code
*/
private static URI getBaseURI(String _package){
return UriBuilder.fromUri(
"http://localhost:8080/api.process.com").build();
}
private static void runRequest(WebResource service,String path){
String response = service.path("rest/xml/"+path).accept(MediaType.APPLICATION_XML).get(String.class);
System.out.println("Post Response :"+response);
}
}
Server Side:
@Path("/xml")
public class Service {
// List of video objects
private ArrayList<Video> videolist;
//Parser object, parses xml into video objects
private Parser parser = new Parser();
/*
* Constructor
* Parse XML and create video list on call
*/
public Service(){
parser.createXML();
videolist = parser.getList();
}
/************************************************
*GET
* Path: /indexpath
* list of all only <video> items
* @return : ArrayList of Video objects
***********************************************/
@GET
@Path("/list")
@Produces(MediaType.APPLICATION_XML)
public List<Video> getCustomerInXML()
{
return videolist;
}
} | java | tomcat | jaxb | jersey | war | null | open | Deploying and running a war file
===
(Please see the code Code below) I am able to run it on Tomcat in the eclipse environment and it works as it should.
I have exported the following to a war file and created a Manifest.MF with:
Manifest-Version: 1.0
Main-Class: com.process.Test
When the code is ran in Eclipse the response from there server side is output to a console.
Now finally my question (Pardon my ignorance, I am fairly new to this):
**Once the war is deployed on my Tomcat server, how do I send a REST request or run the war and display the server response?**
What is the equivalent to :http://localhost:8080/rest/xml/list on a live server?
Client side code:
import java.net.URI;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriBuilder;
import com.sun.jersey.api.client.Client;
//import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.config.ClientConfig;
import com.sun.jersey.api.client.config.DefaultClientConfig;
public class Test
{
public static void main(String[] args) {
//Instead on using Apache Client
//used default Jersey client
//to send requests
ClientConfig config = new DefaultClientConfig();
Client client = Client.create(config);
String _package = "api.amebatv.com";
WebResource service = client.resource(getBaseURI(_package));
//runRequest(service,"indexpath");
runRequest(service,"list");
}
/*
* For testing purposes the base URI is :http://localhost:8080/package name
* Will change to domain name for production code
*/
private static URI getBaseURI(String _package){
return UriBuilder.fromUri(
"http://localhost:8080/api.process.com").build();
}
private static void runRequest(WebResource service,String path){
String response = service.path("rest/xml/"+path).accept(MediaType.APPLICATION_XML).get(String.class);
System.out.println("Post Response :"+response);
}
}
Server Side:
@Path("/xml")
public class Service {
// List of video objects
private ArrayList<Video> videolist;
//Parser object, parses xml into video objects
private Parser parser = new Parser();
/*
* Constructor
* Parse XML and create video list on call
*/
public Service(){
parser.createXML();
videolist = parser.getList();
}
/************************************************
*GET
* Path: /indexpath
* list of all only <video> items
* @return : ArrayList of Video objects
***********************************************/
@GET
@Path("/list")
@Produces(MediaType.APPLICATION_XML)
public List<Video> getCustomerInXML()
{
return videolist;
}
} | 0 |
11,499,511 | 07/16/2012 07:02:56 | 1,528,101 | 07/16/2012 06:46:47 | 1 | 0 | How to get stocks market details on my html5 based android application? | I am developing online market application (html based) using jQuery, I need to fetch the live market details such as stock exchange details, commodity prices, and currency values.
How can i get these details from stock market website and what technology should i use in jquery or javascript.please send the reply soon....thanks. | javascript | android | jquery | html5 | null | 07/16/2012 07:26:36 | not a real question | How to get stocks market details on my html5 based android application?
===
I am developing online market application (html based) using jQuery, I need to fetch the live market details such as stock exchange details, commodity prices, and currency values.
How can i get these details from stock market website and what technology should i use in jquery or javascript.please send the reply soon....thanks. | 1 |
10,831,906 | 05/31/2012 10:34:53 | 321,172 | 04/20/2010 10:04:19 | 718 | 8 | Oracle SQL - Sub-queries | I making a report in EM and I need to figure out somthing here
I have this query that I made:
SELECT
*
FROM
(
SELECT DISTINCT
patch.host as "PHost",
patch.home_location as "PDirectory",
patch.home_name as "PHome",
MAX(patch.INSTALLATION_TIME) as "Patched (Date)",
MAX(patch.PATCH_RELEASE) as "PVersion",
listagg(patch,',') WITHIN GROUP (ORDER BY patch) "Patches"
FROM
mgmt$applied_patches patch
GROUP BY patch.host, patch.home_location,patch.home_name
ORDER BY patch.host, patch.home_location
) "PCH",
(
SELECT DISTINCT
T1.PROPERTY_VALUE as "MHost",
T2.PROPERTY_VALUE as "MDirectory",
T3.PROPERTY_VALUE as "MVersion",
count(T4.PROPERTY_VALUE) as "Count of SID",
listagg(T4.PROPERTY_VALUE,',') WITHIN GROUP (ORDER BY T4.PROPERTY_VALUE) as "SID"
FROM
MGMT$TARGET_PROPERTIES T1,
MGMT$TARGET_PROPERTIES T2,
MGMT$TARGET_PROPERTIES T3,
MGMT$TARGET_PROPERTIES T4
WHERE
T1.TARGET_GUID = T2.TARGET_GUID
and T1.TARGET_GUID = T3.TARGET_GUID
and T1.TARGET_GUID = T4.TARGET_GUID
and T1.PROPERTY_NAME = 'MachineName'
and T2.PROPERTY_NAME = 'OracleHome'
and T3.PROPERTY_NAME = 'Version'
and T4.PROPERTY_NAME = 'SID'
GROUP BY T1.PROPERTY_VALUE, T2.PROPERTY_VALUE, T3.PROPERTY_VALUE
) "MGM"
WHERE
PDirectory = MDirectory
I'm getting error ORA-00904: "MDIRECTORY":....
I tried many combinations! (PCH.PDirectory = MGM.MDirectory, ......) nothing works
cheers | sql | oracle | oracle11g | null | null | null | open | Oracle SQL - Sub-queries
===
I making a report in EM and I need to figure out somthing here
I have this query that I made:
SELECT
*
FROM
(
SELECT DISTINCT
patch.host as "PHost",
patch.home_location as "PDirectory",
patch.home_name as "PHome",
MAX(patch.INSTALLATION_TIME) as "Patched (Date)",
MAX(patch.PATCH_RELEASE) as "PVersion",
listagg(patch,',') WITHIN GROUP (ORDER BY patch) "Patches"
FROM
mgmt$applied_patches patch
GROUP BY patch.host, patch.home_location,patch.home_name
ORDER BY patch.host, patch.home_location
) "PCH",
(
SELECT DISTINCT
T1.PROPERTY_VALUE as "MHost",
T2.PROPERTY_VALUE as "MDirectory",
T3.PROPERTY_VALUE as "MVersion",
count(T4.PROPERTY_VALUE) as "Count of SID",
listagg(T4.PROPERTY_VALUE,',') WITHIN GROUP (ORDER BY T4.PROPERTY_VALUE) as "SID"
FROM
MGMT$TARGET_PROPERTIES T1,
MGMT$TARGET_PROPERTIES T2,
MGMT$TARGET_PROPERTIES T3,
MGMT$TARGET_PROPERTIES T4
WHERE
T1.TARGET_GUID = T2.TARGET_GUID
and T1.TARGET_GUID = T3.TARGET_GUID
and T1.TARGET_GUID = T4.TARGET_GUID
and T1.PROPERTY_NAME = 'MachineName'
and T2.PROPERTY_NAME = 'OracleHome'
and T3.PROPERTY_NAME = 'Version'
and T4.PROPERTY_NAME = 'SID'
GROUP BY T1.PROPERTY_VALUE, T2.PROPERTY_VALUE, T3.PROPERTY_VALUE
) "MGM"
WHERE
PDirectory = MDirectory
I'm getting error ORA-00904: "MDIRECTORY":....
I tried many combinations! (PCH.PDirectory = MGM.MDirectory, ......) nothing works
cheers | 0 |
10,820,480 | 05/30/2012 16:34:24 | 1,415,064 | 05/24/2012 12:38:42 | 1 | 0 | Pre-requisites to learn node.js? | I want to learn Node.js. I'm sure, I will need good experience in Javascript (OOP). Is there any other technology i should know about to learn it? And also how long will it take me to starting implementing node.js taking into account i have decent experience in Javascript?
Thank You | javascript | node.js | null | null | null | 05/30/2012 20:06:14 | not constructive | Pre-requisites to learn node.js?
===
I want to learn Node.js. I'm sure, I will need good experience in Javascript (OOP). Is there any other technology i should know about to learn it? And also how long will it take me to starting implementing node.js taking into account i have decent experience in Javascript?
Thank You | 4 |
11,527,171 | 07/17/2012 16:49:29 | 1,455,182 | 06/14/2012 02:47:31 | 33 | 0 | log into any window user account with a master password? | is there a way to set a master password to login to any user account? i am not talking about having an admin account. for instance if bob is away from his computer and logged off and i dont know his password but want to change things things directly on his account how do i do this? In short can you set 2 passwords to 1 user account, a master and user? | windows | passwords | null | null | null | 07/18/2012 01:43:53 | off topic | log into any window user account with a master password?
===
is there a way to set a master password to login to any user account? i am not talking about having an admin account. for instance if bob is away from his computer and logged off and i dont know his password but want to change things things directly on his account how do i do this? In short can you set 2 passwords to 1 user account, a master and user? | 2 |
5,368,657 | 03/20/2011 13:05:49 | 290,503 | 03/10/2010 12:35:45 | 709 | 39 | adobe flash based tablet ? | anybody ever come up with idea like, a tablet that run only adobe flash ?
or for making such device , what could be minimum system software and hardware requirement ?
AND , is licences of flash/adobe allows it in first place ? | flash | tablet | null | null | null | null | open | adobe flash based tablet ?
===
anybody ever come up with idea like, a tablet that run only adobe flash ?
or for making such device , what could be minimum system software and hardware requirement ?
AND , is licences of flash/adobe allows it in first place ? | 0 |
7,432,023 | 09/15/2011 13:54:43 | 936,551 | 09/09/2011 10:10:05 | 1 | 0 | converting an asp page to php | I have an old asp site, and I'm in the process to convert it to PHP/MySql. It's a small regional accommodation site. I'm by far not a programmer, so I'm doing it using Dreamweaver. I could easily convert the list-type pages using DW, and only the individual accommodation pages remained.
There are two pages which I would like to convert.
These pages has been made not by me long ago, and they were hard-coded.
Every accommodation has a separate file (I know it would be much better to make a PHP project, but it's really beyond my knowledge), and they all look like this:
mysite.com/hotel/**hotelname.asp**
and it contains only this code:
<%
h=<ID of accommodation>
%>
<!--#include file="../inc/hotelpage.asp"-->
hotelpage.asp begins with this code:
<!--#include file="../include/global.lib"-->' this file contains connection string, I can solve this
<%
if h<1 then
h = request.querystring("h")
end if
if h = "" then
response.redirect "../find.asp"
end if
sql = "select * from hotel_table where hotelid ='" & h & "'"
dodb(sql)
if rs.eof or rs.bof then
response.write "Invalid access. Press the back button."
halt_rs = true
end if
if not halt_rs then
%>
I could solve the rest of this file.
Could anyone help me to convert the two above files?
Thank you
Yaelede | php | asp | null | null | null | 09/15/2011 22:07:47 | not constructive | converting an asp page to php
===
I have an old asp site, and I'm in the process to convert it to PHP/MySql. It's a small regional accommodation site. I'm by far not a programmer, so I'm doing it using Dreamweaver. I could easily convert the list-type pages using DW, and only the individual accommodation pages remained.
There are two pages which I would like to convert.
These pages has been made not by me long ago, and they were hard-coded.
Every accommodation has a separate file (I know it would be much better to make a PHP project, but it's really beyond my knowledge), and they all look like this:
mysite.com/hotel/**hotelname.asp**
and it contains only this code:
<%
h=<ID of accommodation>
%>
<!--#include file="../inc/hotelpage.asp"-->
hotelpage.asp begins with this code:
<!--#include file="../include/global.lib"-->' this file contains connection string, I can solve this
<%
if h<1 then
h = request.querystring("h")
end if
if h = "" then
response.redirect "../find.asp"
end if
sql = "select * from hotel_table where hotelid ='" & h & "'"
dodb(sql)
if rs.eof or rs.bof then
response.write "Invalid access. Press the back button."
halt_rs = true
end if
if not halt_rs then
%>
I could solve the rest of this file.
Could anyone help me to convert the two above files?
Thank you
Yaelede | 4 |
6,845,190 | 07/27/2011 13:32:13 | 148,381 | 07/31/2009 09:15:19 | 2,569 | 127 | Where are the default Eclipse Plugin Development Templates? | I have just started looking at developing a plugin for Eclipse and I found a bunch of tutorials, some of which seem out of date (i.e. using old versions of Eclipse). But I have found one that uses Helios, so it is pretty up to date. Yet all of them refer to creating the projects using templates. Whenever I start a new plugin project the list of templates is empty. Does anyone know where these templates come from? Is there something specific I need to install within Eclipse to get the templates? Can I download them separately from somewhere else? | java | eclipse | eclipse-plugin | null | null | null | open | Where are the default Eclipse Plugin Development Templates?
===
I have just started looking at developing a plugin for Eclipse and I found a bunch of tutorials, some of which seem out of date (i.e. using old versions of Eclipse). But I have found one that uses Helios, so it is pretty up to date. Yet all of them refer to creating the projects using templates. Whenever I start a new plugin project the list of templates is empty. Does anyone know where these templates come from? Is there something specific I need to install within Eclipse to get the templates? Can I download them separately from somewhere else? | 0 |
7,564,236 | 09/27/2011 04:35:04 | 963,300 | 09/25/2011 04:55:59 | 6 | 0 | Programming Fundamentals/ simple architecture | Okay so I have this programming fundamentals course, it is a distant learning course (online and on my own time) the Teacher is not very helpful at all when it comes to responding to emails, and even fails to show on scheduled appointment.
Could ya'll take a look at this and tell me If there is any flaw in my answers (in bold)???
Im not looing for direct answers, but rather criticism!
Thank you -Daniel
#43
An imaginary computer has four data registers (R0 to R4), 1024 words of memory, and 16 different instructions (add, subtract, etc.). What is the minimum size of an instruction in bits if the typical instruction uses the following format: add 565 R2
**10 bits because
2^10= 1024
LOG2(2^10) = 10**
#44
If the computer in exercise 43 uses the same size of word for data and instructions, what is the size of each data register?
**128 bits because the data bus and Instruction Register are also 128**
#45
What is the size of the instruction register in the computer in exercise 43?
**The instruction register size is determined by the word size in this case the answer is
1024 words / 8 bits(1 word) = 128 bits**
#46
What is the size of the program counter in the computer in exercise 43?
**The size of the program counter is determined by the size of the address bus in this case the answer is 10**
#47
What is the size of the data bus?
**The size of the data bus is determined by size of the word used in the computer in this case 1024/8 = 128.
So 128, so that all 128 bits of the word can be transferred at the same time**
#48
What is the size of the address bus?
**The size of the address bus is 10 bits
Because the computer has 2^10 [1024] words, the size of the bus must be 10 bits wide in order to carry 10 bits at a time.**
| homework | architecture | null | null | null | 09/27/2011 05:55:41 | off topic | Programming Fundamentals/ simple architecture
===
Okay so I have this programming fundamentals course, it is a distant learning course (online and on my own time) the Teacher is not very helpful at all when it comes to responding to emails, and even fails to show on scheduled appointment.
Could ya'll take a look at this and tell me If there is any flaw in my answers (in bold)???
Im not looing for direct answers, but rather criticism!
Thank you -Daniel
#43
An imaginary computer has four data registers (R0 to R4), 1024 words of memory, and 16 different instructions (add, subtract, etc.). What is the minimum size of an instruction in bits if the typical instruction uses the following format: add 565 R2
**10 bits because
2^10= 1024
LOG2(2^10) = 10**
#44
If the computer in exercise 43 uses the same size of word for data and instructions, what is the size of each data register?
**128 bits because the data bus and Instruction Register are also 128**
#45
What is the size of the instruction register in the computer in exercise 43?
**The instruction register size is determined by the word size in this case the answer is
1024 words / 8 bits(1 word) = 128 bits**
#46
What is the size of the program counter in the computer in exercise 43?
**The size of the program counter is determined by the size of the address bus in this case the answer is 10**
#47
What is the size of the data bus?
**The size of the data bus is determined by size of the word used in the computer in this case 1024/8 = 128.
So 128, so that all 128 bits of the word can be transferred at the same time**
#48
What is the size of the address bus?
**The size of the address bus is 10 bits
Because the computer has 2^10 [1024] words, the size of the bus must be 10 bits wide in order to carry 10 bits at a time.**
| 2 |
10,264,062 | 04/21/2012 23:50:43 | 265,683 | 02/03/2010 21:40:43 | 246 | 6 | What is the best way to parse Starcraft 2 replays using Java | I want to create an app for android which will parse Starcraft 2 replays in the format MQP.
There was an old project called WARP - but I think it has died... if there was a c# or c++ implementation, I may be able to use that by natively calling it from Java / Android but that would not be ideal.
Please help.
ANdy | c# | java | android | c++ | null | 04/22/2012 00:01:00 | not a real question | What is the best way to parse Starcraft 2 replays using Java
===
I want to create an app for android which will parse Starcraft 2 replays in the format MQP.
There was an old project called WARP - but I think it has died... if there was a c# or c++ implementation, I may be able to use that by natively calling it from Java / Android but that would not be ideal.
Please help.
ANdy | 1 |
7,023,283 | 08/11/2011 08:57:55 | 889,472 | 08/11/2011 08:04:22 | 1 | 0 | who can give me some suggestion on learn the kernel of linux? | Recently,I want to lean the linux OS,but whit the awful source code I feel that I'v lost in the source code and I haven't got anything.so ,who can tell me some of your experiences on learn linux OS or some advise.thanks! | operating-system | null | null | null | null | 08/11/2011 09:02:08 | not a real question | who can give me some suggestion on learn the kernel of linux?
===
Recently,I want to lean the linux OS,but whit the awful source code I feel that I'v lost in the source code and I haven't got anything.so ,who can tell me some of your experiences on learn linux OS or some advise.thanks! | 1 |
9,754,892 | 03/18/2012 00:08:09 | 887,651 | 08/10/2011 10:03:05 | 607 | 0 | Is there Rstudio in the Fedora 16 Repositories? | I would like to use Rstudio as IDE for R applications, but at the moment I don't see it in the repository, before installing it from .rpm, could someone tell me if Rstudio is in FEdora 16 Repos ?
Thanks
| linux | r | fedora | null | null | 05/24/2012 12:20:25 | off topic | Is there Rstudio in the Fedora 16 Repositories?
===
I would like to use Rstudio as IDE for R applications, but at the moment I don't see it in the repository, before installing it from .rpm, could someone tell me if Rstudio is in FEdora 16 Repos ?
Thanks
| 2 |
4,129,949 | 11/09/2010 02:22:55 | 174,472 | 09/16/2009 16:49:45 | 346 | 4 | how to stop OS X Core Data Spotlight help tags showing external record file path? | I am developing a non-document-based core data app for OS X 10.6. It is based on the template generated by XCode 3.2.4 when "Create document-based application" is **not** checked and "Use Core Data for Storage" and "Include Spotlight Importer" **are** checked.
My spotlight importer sets kMDItemDisplayName to a summary of the row of the main database table. No other kMDItem attributes are set. No metadata is imported from the persistent store, only from the external record files.
Everything works fine with one exception:
When I hover my mouse over a Spotlight result, the yellow help tag shows the path to the external records file for the corresponding database record. That looks like gibberish to the average user, i.e. <br>/Users/username/Library/Caches/Metadata/CoreData/appname/uuid/entity/x/y.
Is there any way to stop that from happening? Ideally, I would like the help tag to refer to my application's name.
I tried setting several of the other kMDItem attributes, but they don't appear to change the displayed help tag. | osx | core-data | spotlight | null | null | null | open | how to stop OS X Core Data Spotlight help tags showing external record file path?
===
I am developing a non-document-based core data app for OS X 10.6. It is based on the template generated by XCode 3.2.4 when "Create document-based application" is **not** checked and "Use Core Data for Storage" and "Include Spotlight Importer" **are** checked.
My spotlight importer sets kMDItemDisplayName to a summary of the row of the main database table. No other kMDItem attributes are set. No metadata is imported from the persistent store, only from the external record files.
Everything works fine with one exception:
When I hover my mouse over a Spotlight result, the yellow help tag shows the path to the external records file for the corresponding database record. That looks like gibberish to the average user, i.e. <br>/Users/username/Library/Caches/Metadata/CoreData/appname/uuid/entity/x/y.
Is there any way to stop that from happening? Ideally, I would like the help tag to refer to my application's name.
I tried setting several of the other kMDItem attributes, but they don't appear to change the displayed help tag. | 0 |
2,999,589 | 06/08/2010 17:10:25 | 270,536 | 02/10/2010 18:51:28 | 35 | 2 | Add a tab to Drupal node | I want to add a tab to Drupal node like in the following picture:
![alt text][1]
The picture has 3 tabs, Views, CVS Instructions, Revisions. I want to add another tab "Translation". What module should I use?
The picture was taken from http://drupal.org/project/panels_tabs
Thank you.
[1]: http://img708.imageshack.us/img708/4424/20100609000126.jpg | drupal | drupal-modules | null | null | null | null | open | Add a tab to Drupal node
===
I want to add a tab to Drupal node like in the following picture:
![alt text][1]
The picture has 3 tabs, Views, CVS Instructions, Revisions. I want to add another tab "Translation". What module should I use?
The picture was taken from http://drupal.org/project/panels_tabs
Thank you.
[1]: http://img708.imageshack.us/img708/4424/20100609000126.jpg | 0 |
5,122,294 | 02/25/2011 20:32:54 | 388,538 | 07/10/2010 18:16:37 | 282 | 4 | php - sprintf very simple question | I'm just wondering if omitting an argument from sprintf is going to cause any issues.
I can't recall for sure, but I think on one of my sites if I omitted the arguments it error'd out, but I tried it on a different server and it's not posting any issues with all php error notices turned on.
Just want to double check!
Example:
sprintf('This is an example %s','test'); // outputs "This is an example test"
sprintf('This is an example','test'); // outputs "This is an example"
| php | null | null | null | null | null | open | php - sprintf very simple question
===
I'm just wondering if omitting an argument from sprintf is going to cause any issues.
I can't recall for sure, but I think on one of my sites if I omitted the arguments it error'd out, but I tried it on a different server and it's not posting any issues with all php error notices turned on.
Just want to double check!
Example:
sprintf('This is an example %s','test'); // outputs "This is an example test"
sprintf('This is an example','test'); // outputs "This is an example"
| 0 |
10,978,960 | 06/11/2012 11:10:37 | 471,011 | 10/09/2010 16:12:13 | 837 | 0 | Java. Work with BigDecimal values | I have next conditions:
- two BigDecimal values: **b1** and **b2**;
- **x** - Integer;
- **b1 > b2**;
Task:
**Find min x**, when **b2 * x > b1**;
Generally, all very easy. Main problem for me - I must work with BigDecimal values.
For example, if all values - Integer, than:
if(b1%b2 == 0)
{x = b1/b2;}
else
{x = b1/b2 +1; }
as you can see - just 4 easy lines.
But what can I do with BigDecimal? | java | algorithm | bigdecimal | null | null | 06/12/2012 09:53:26 | not a real question | Java. Work with BigDecimal values
===
I have next conditions:
- two BigDecimal values: **b1** and **b2**;
- **x** - Integer;
- **b1 > b2**;
Task:
**Find min x**, when **b2 * x > b1**;
Generally, all very easy. Main problem for me - I must work with BigDecimal values.
For example, if all values - Integer, than:
if(b1%b2 == 0)
{x = b1/b2;}
else
{x = b1/b2 +1; }
as you can see - just 4 easy lines.
But what can I do with BigDecimal? | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.