Search Results

Search found 164 results on 7 pages for 'tommy jakobsen'.

Page 5/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Type mismatch: cannot convert from ArrayList<Data> to MyCollection

    - by Tommy
    I've read similar questions here but I'm still a little confused. MyCollection extends ArrayList<MyClass> MyClass implements Data yet this gives me the "cannot convert from ArrayList to MyCollection" MyCollection mycollection = somehandler.getCollection(); where getCollection looks like this public ArrayList<Data> getCollection() So my assumptions are obviously wrong. How can I make this work like I would like it to

    Read the article

  • Can I use cstdio in a C program?

    - by Tommy
    Can I use cstdio in a C program? I get a ton of errors in cstdio when I add the #include <cstdio> to the C program. c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2143: syntax error : missing '{' before ':' c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2059: syntax error : ':' Thanks EDIT - I would like to use snprintf, which is why I am trying to include this.

    Read the article

  • on click checkbox set input attr

    - by Tommy Arnold
    html form with 4 columns the first 2 columns are the sizes inside input boxes with disabled ='disabled', when they click radio button to select a size a checkbox appears, when they click that checkbox I would like to change the class and disabled attr of the inputs on that table row to allow them to edit the input box <table width="388" border="1" id="product1"> <tr> <td width="100">Width</td> <td width="100">Height</td> <td width="48">Price</td> <td width="65">Select</td> </tr> <tr> <td><input type="text" disabled='disabled'value="200"/><span> CMS</span></td> <td><input disabled='disabled'type="text" value="500"/><span> CMS</span></td> <td>£50.00</td> <td><input type="radio" name="product1" value="size1" /> Customise<input type="checkbox" name="custom[size1]" class="custombox" value="1"/></td> </tr> <tr> <td>200</td> <td>1000</td> <td>£100.00</td> <td><input type="radio" name="product1" value="size2" /> Customise<input disabled='disabled' type="checkbox" name="custom[size2]" class="custombox" value="1"/></td> </tr> <tr> <td>200</td> <td>1500</td> <td>£150</td> <td><input type="radio" name="product1" value="size3" /> Customise<input type="checkbox" name="custom[size3]" class="custombox" value="1"/></td> </tr> </table> <table width="288" border="1" id="product2"> <tr> <td width="72">Width</td> <td width="75">Height</td> <td width="48">Price</td> <td width="65">&nbsp;</td> </tr> <tr> <td>200</td> <td>500</td> <td>£50.00</td> <td><input type="radio" name="product2" value="size1" /> Customise<input type="checkbox" name="custom[size1]" class="custombox" value="1"/></td> </tr> <tr> <td>200</td> <td>1000</td> <td>£100.00</td> <td><input type="radio" name="product2" value="size2" /> Customise<input type="checkbox" name="custom[size2]" class="custombox" value="1"/></td> </tr> <tr> <td>200</td> <td>1500</td> <td>£150</td> <td><input type="radio" name="product2" value="size3" /> Customise<input type="checkbox" name="custom[size3]" class="custombox" value="1"/></td> </tr> <table> CSS input[type=checkbox] { display: none; } input[type=checkbox].shown { display: inline; } input .edit{ border:1px solid red; } input[disabled='disabled'] { border:0px; width:60px; padding:5px; float:left; background:#fff; } span{float:left; width:30px; padding:5px;} Jquery $("body :checkbox").hide(); // The most obvious way is to set radio-button click handlers for each table separatly: $("#product1 :radio").click(function() { $("#product1 :checkbox").hide(); $("#product1 .cbox").hide(); $(this).parent().children(":checkbox").show(); $(this).parent().children(".cbox").show(); }); $("#product2 :radio").click(function() { $("#product2 :checkbox").hide(); $("#product2 .cbox").hide(); $(this).parent().children(":checkbox").show(); $(this).parent().children(".cbox").show(); }); This is what I thought but its not working $("#product1 :checkbox").click(function(){ $(this).parent("tr").children("td :input").attr('disabled',''); $(this).parent("tr").children("td :input").toggleClass(edit); }); $("#product2 :checkbox").click(function(){ $(this).parent("tr").children("td :input").attr('disabled',''); $(this).parent("tr").children("td :input").toggleClass(edit); }); Thanks in advance for any help.

    Read the article

  • Styling the selection color of an input type=text, possible?

    - by Tommy
    Having an input <input type="text" id="myTest" value="bla bla bla"/> and doing this (using jQuery) $('#myTest').select(); causes "bla bla bla" to be selected with default dark blue selection color. Now, is there any way I can change this color using css? css3 can change selection using for instance ::-moz-selection { background: #ffb7b7; } but this only works on text in other elements, not in html inputs. Any ideas? /T

    Read the article

  • Entity Framework autoincrement key

    - by Tommy Ong
    I'm facing an issue of duplicated incremental field on a concurrency scenario. I'm using EF as the ORM tool, attempting to insert an entity with a field that acts as a incremental INT field. Basically this field is called "SequenceNumber", where each new record before insert, will read the database using MAX to get the last SequenceNumber, append +1 to it, and saves the changes. Between the getting of last SequenceNumber and Saving, that's where the concurrency is happening. I'm not using ID for SequenceNumber as it is not a unique constraint, and may reset on certain conditions such as monthly, yearly, etc. InvoiceNumber | SequenceNumber | DateCreated INV00001_08_14 | 1 | 25/08/2014 INV00001_08_14 | 1 | 25/08/2014 <= (concurrency is creating two SeqNo 1) INV00002_08_14 | 2 | 25/08/2014 INV00003_08_14 | 3 | 26/08/2014 INV00004_08_14 | 4 | 27/08/2014 INV00005_08_14 | 5 | 29/08/2014 INV00001_09_14 | 1 | 01/09/2014 <= (sequence number reset) Invoice number is formatted based on the SequenceNumber. After some research I've ended up with these possible solutions, but wanna know the best practice 1) Optimistic Concurrency, locking the table from any reads until the current transaction is completed (not fancy of this idea as I guess performance will be of a great impact?) 2) Create a Stored Procedure solely for this purpose, does select and insert on a single statement as such concurrency is at minimum (would prefer a EF based approach if possible)

    Read the article

  • Android - binding to service

    - by tommy
    Hi: I can't seem to get an activity to bind to a service in the same package. The activity looks like this: public class myApp extends TabActivity { static private String TAG = "myApp"; private myService mService = null; private ServiceConnection mServiceConn = new ServiceConnection(){ public void onServiceConnected(ComponentName name, IBinder service) { Log.v(TAG, "Service: " + name + " connected"); mService = ((myService.myBinder)service).getService(); } public void onServiceDisconnected(ComponentName name) { Log.v(TAG, "Service: " + name + " disconnected"); } }; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); doBind(); Log.i(TAG, "Started (UI Thread)"); // set content setContentView(R.layout.main); Resources res = getResources(); // Resource object to get Drawables TabHost tabHost = getTabHost(); // The activity TabHost ... add some tabs here.... tabHost.setCurrentTab(0); } private void doBind(){ Intent i = new Intent(this,myService.class); if( bindService(i, mServiceConn, 0 )){ Log.i(TAG, "Service bound"); } else { Log.e(TAG, "Service not bound"); } } } Then the service: public class myService extends Service { private String TAG = "myService"; private boolean mRunning = false; @Override public int onStartCommand(Intent intent, int flags, int startid) { Log.i(TAG,"Service start"); mRunning = true; Log.d(TAG,"Finished onStartCommand"); return START_STICKY; } /* * Called on service stop */ @Override public void onDestroy(){ Log.i(TAG,"onDestroy"); mRunning = false; super.onDestroy(); } @Override public IBinder onBind(Intent intent) { return mBinder; } boolean isRunning() { return mRunning; } /* * class for binding */ private final IBinder mBinder = new myBinder(); public class myBinder extends Binder { myService getService() { return myService.this; } } } bindService returns true, but onServiceConnection is never called (mService is always null, so I can't do something like mService.isRunning() ) The manifest entry for the service is just: <service android:name=".myService"></service> I was copying the code direct from the Android developers site, but I must have missed something.

    Read the article

  • Efficient storage in C#.net App

    - by Tommy
    I'm looking for the fastest, least memory consuming, stand alone storage method available for large amounts of data for my C# app. My initial thoughts: Sql: no. not stand alone XML in flat file: no. takes too long to parse large amounts of data Other Options? Basically what i'm looking for, is a way that i can load with my applications load, keep all the data in my app, and when the data in my app changes just update the storage location.

    Read the article

  • Visual Studio 2008 (C#) with SQL Compact Edition database error: 26

    - by Tommy
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) I've created a SQL compact database, included it in my application, and can connect to the database fine from other database editors, but within my application im trying using (SqlConnection con = new SqlConnection(Properties.Settings.Default.DatabaseConnection)) { con.Open(); } the connection string is Data Source=|DataDirectory|\Database.sdf I'm stumped, any insight?

    Read the article

  • How do I change the curosr during a jQuery synchronous browser blocking POST?

    - by Tommy
    $.ajax({ url: "/cgi-bin/stats.exe", method: "post", async: false, data: { refresh: "a41" } }); Using ajax post synchronously - "async: false". While it blocks the browser during the active request, what is the most efficient way to change the cursor to the hourglass or display a wait .gif? Perhaps set the cursor as it enters this function then change it back in the success or complete function? Any advice is appreciated. Thank You.

    Read the article

  • Create a timer countdown using hours, minutes & seconds from a future date

    - by Tommy Coffee
    I am using some code I found on the internet that creates a countdown from a certain date. I am trying to edit the code so that it only gives me a countdown from an hour, minute, and second that I specify from a future date. I cannot just have code that counts down from a specified time, I need it to countdown to a specified date in the future. This is important so that if the browser is refreshed the countdown doesn't start over but continues where left off. I will be using cookies so the browser remembers what future date was specified when it was first run. Here is the HTML: <form name="count"> <input type="text" size="69" name="count2"> </form> And here is the javascript: window.onload = function() { //change the text below to reflect your own, var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") function countdown(yr,m,d){ var theyear=yr; var themonth=m; var theday=d var today=new Date() var todayy=today.getYear() if (todayy < 1000) todayy+=1900; var todaym=today.getMonth() var todayd=today.getDate() var todayh=today.getHours() var todaymin=today.getMinutes() var todaysec=today.getSeconds() var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec futurestring=montharray[m-1]+" "+d+", "+yr var dd=Date.parse(futurestring)-Date.parse(todaystring) var dday=Math.floor(dd/(60*60*1000*24)*1) var dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1) var dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1) var dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1) if(dday==0&&dhour==0&&dmin==0&&dsec==1){ document.forms.count.count2.value=current return } else document.forms.count.count2.value= dhour+":"+dmin+":"+dsec; setTimeout(function() {countdown(theyear,themonth,theday)},1000) } //enter the count down date using the format year/month/day countdown(2012,12,25) } I am sure there is superfluous code above since I only need an hour, minute, and second that I would like to pass to the countdown() function. The year, month and day is unimportant but as I said this is code I am trying to edit which I found on the internet. Any help would be very appreciated. Thank you!

    Read the article

  • Child service not writing to event log

    - by Tommy Fisk
    I am having a very simple (but incredibly frustrating) issue with a parent service and the child service. Let's call the parent service "Service A" and the child "Service B". Both services reside on the same box. Using WCF Storm, when I send Service B a message, I see lots of entries in the event viewer for it. However, if I send a message to Service A, which calls Service B, I only see entries from Service A. So for some reason, the child logs are not written when the parent calls it, but if I call it myself, the logs do indeed show up, so I know it's not a problem with the logging or anything like that. Here is what I am using to write to the event log. // in some random static class private static EventLog el = new EventLog(); el.WriteEntry("In " + location + ", " + message); // params passed in Does anyone know why this is happening? And more importantly what I can do about it?

    Read the article

  • Sliding & Fading controls on a C# form

    - by Tommy
    Hey there, I'm trying to implement a way to slide&fade controls around (more than one at the same time possibly) elegantly. So in other words, say i had a picture in the top left corner, and a texbox in the bottom right corner, i'd like to be able to have them slide. not just snap. slide, to the opposite corners and replace eachothers position. Ive been working for awhile but have not come up with anything efficient, even just some of the basic math calculations would be a great start.

    Read the article

  • implement AOP for Controllers in Spring 3

    - by tommy
    How do I implement AOP with an annotated Controller? I've search and found two previous posts regarding the problem, but can't seem to get the solutions to work. posted solution 1 posted solution 2 Here's what I have: Dispatch Servlet: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"> <context:annotation-config/> <context:component-scan base-package="com.foo.controller"/> <bean id="fooAspect" class="com.foo.aop.FooAspect" /> <aop:aspectj-autoproxy> <aop:include name="fooAspect" /> </aop:aspectj-autoproxy> </beans> Controller: @Controller public class FooController { @RequestMapping(value="/index.htm", method=RequestMethod.GET) public String showIndex(Model model){ return "index"; } } Aspect: @Aspect public class FooAspect { @Pointcut("@target(org.springframework.stereotype.Controller)") public void controllerPointcutter() {} @Pointcut("execution(* *(..))") public void methodPointcutter() {} @Before("controllerPointcutter()") public void beforeMethodInController(JoinPoint jp){ System.out.println("### before controller call..."); } @AfterReturning("controllerPointcutter() && methodPointcutter() ") public void afterMethodInController(JoinPoin jp) { System.out.println("### after returning..."); } @Before("methodPointcutter()") public void beforeAnyMethod(JoinPoint jp){ System.out.println("### before any call..."); } } The beforeAnyMethod() works for methods NOT in a controller; I cannot get anything to execute on calls to controllers. Am I missing something?

    Read the article

  • Oracle SQL: Query results from previous X isoweeks () (where X might be > 52)

    - by tommy-o-dell
    How could I adapt this query to show the previous 61 weeks? (still exlcluding the current week). My query currently shows me the total weekly sales for 2010 grouped by ISO Week and ISO Year (exlcuding the current week). select to_char(order_date,'IYYY') as iso_year, to_char(order_date,'IW') as iso_week, sum(sale_amount) from orders where to_char(order_date,'IW') <> to_char(SYSDATE) and to_char(order_date,'IYYY') = 2010 group by to_char(order_date,'IYYY') to_char(order_date,'IW') I realize I could probably just omit the "2010" requirement, order by desc and limit results to a certain bnumber of rows. But that just doesn't seem right! Much appreciate any help pointing me in the right direction!

    Read the article

  • Adobe Air: Is it possible to save files to a network path (osx)

    - by tommy
    I was wondering if it would be possible to write a file, not to the local system, but to a connected server or other network path. Would i have to use an external php interface for this or can i entrust this to the AIR framework? I'm pretty sure that AIR has certain security precautions to prevent this. Thanks a bunch! Regards

    Read the article

  • User Drawn Controls: the MSN chat window

    - by Tommy
    I'm wondering about the famous MSN chat clients conversation windows! I'm sure there must be alot of different aspects but I'd like to focus on those little sliding panes. For instance where the pictures of the people in the conversation is displayed. When you click the collapse button the pictures dissapear and the panel gracefully slides in, and when you click it again to expand, it slides out and the pictures are smoothly faded in. How would one go about customly drawing a control in WinForms that had simmilar behaviour?

    Read the article

  • Should a company prevent employees from publishing an app in an appstore in their free time?

    - by Tommy
    My company is trying to pass a policy forbidding distribution of any application (even free) in any appstore for all developers. Their reasoning is that "outside work activities create a conflict of interest". They don't want that "you use your spare time to work on your app, and once it takes off you quit your job" (quoting the Head of Development). A few developers (myself included) have already said it was an abusive, pointless and most of all counter-productive policy (developers will actually be demotivated to work here under such control and to be denied of the freedom to distribute their project). Personally, I think it is actually in the interest of the company to promote side projects (even commercial activities, if there is no conflict). I'm also curious, is that common practice?

    Read the article

  • Efficient storage in .Net App

    - by Tommy
    I'm looking for the fastest, least memory consuming, stand alone storage method available for large amounts of data for my C# app. My initial thoughts: Sql: no. not stand alone XML in flat file: no. takes too long to parse large amounts of data Other Options? Basically what i'm looking for, is a way that i can load with my applications load, keep all the data in my app, and when the data in my app changes just update the storage location.

    Read the article

  • Achieving C# "readonly" behavior in C++

    - by Tommy Fisk
    Hi guys, this is my first question on stack overflow, so be gentle. Let me first explain the exact behavior I would like to see. If you are familiar with C# then you know that declaring a variable as "readonly" allows a programmer to assign some value to that variable exactly once. Further attempts to modify the variable will result in an error. What I am after: I want to make sure that any and all single-ton classes I define can be predictably instantiated exactly once in my program (more details at the bottom). My approach to realizing my goal is to use extern to declare a global reference to the single-ton (which I will later instantiate at a time I choose. What I have sort of looks like this, namespace Global { extern Singleton& mainInstance; // not defined yet, but it will be later! } int main() { // now that the program has started, go ahead and create the singleton object Singleton& Global::mainInstance = Singleton::GetInstance(); // invalid use of qualified name Global::mainInstance = Singleton::GetInstance(); // doesn't work either :( } class Singleton { /* Some details ommited */ public: Singleton& GetInstance() { static Singleton instance; // exists once for the whole program return instance; } } However this does not really work, and I don't know where to go from here. Some details about what I'm up against: I'm concerned about threading as I am working on code that will deal with game logic while communicating with several third-party processes and other processes I will create. Eventually I would have to implement some kind of synchronization so multiple threads could access the information in the Singleton class without worry. Because I don't know what kinds of optimizations I might like to do, or exactly what threading entails (never done a real project using it), I was thinking that being able to predictably control when Singletons were instantiated would be a Good Thing. Imagine if Process A creates Process B, where B contains several Singletons distributed against multiple files and/or libraries. It could be a real nightmare if I can not reliably ensure the order these singleton objects are instantiated (because they could depend on each other, and calling methods on a NULL object is generally a Bad Thing). If I were in C# I would just use the readonly keyword, but is there any way I can implement this (compiler supported) behavior in C++? Is this even a good idea? Thanks for any feedback.

    Read the article

  • Jquery toggle input disabled attribute

    - by Tommy Arnold
    here is my code $("#product1 :checkbox").click(function(){ $(this) .closest('tr') // find the parent row .find(":input[type='text']") // find text elements in that row .attr('disabled',false).toggleClass('disabled') // enable them .end() // go back to the row .siblings() // get its siblings .find(":input[type='text']") // find text elements in those rows .attr('disabled',true).removeClass('disabled'); // disable them }); how do i toggle .attr('disabled',false); I cant seem to find it on google.

    Read the article

  • What is the best way to generate XML from a C based CGI application using the SQLite API?

    - by Tommy
    Learning the basics of XML for the first time from W3C tutorials. How are most XML files generated? Does the server side application usually print a complete XML file to be parsed each time there is new data? I have a CGI application in C and it includes the SQLite API. Is the best way to do some sort of printf to a XML file (using my data from the database) so it can be parsed? Thanks.

    Read the article

  • Form allow click-through in C#

    - by Tommy
    Hey, so I have a form, and i've set it to semi-transparent. i'd like for people to be able to click on the forms area, and the form not handle the click, but instead whatever is underneath it handle the click. is this possible?

    Read the article

  • Any experiences with the big three online job sites?

    - by Tommy
    My company is preparing to post some job postings for a programmer (or two) and am curious as to what experiences any of you have had with the big three job posting providers (Monster, CareerBuilder, HotJobs). Are there others out there that we don't know about that might be better? Any thoughts/insights would be appreciated!

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >