Search Results

Search found 3423 results on 137 pages for 'tom daniel'.

Page 106/137 | < Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >

  • Confused by "let" in Clojure

    - by Tom Dalling
    I just started playing with Clojure, and I wrote a small script to help me understand some of the functions. It begins like this: (def *exprs-to-test* [ "(filter #(< % 3) '(1 2 3 4 3 2 1))" "(remove #(< % 3) '(1 2 3 4 3 2 1))" "(distinct '(1 2 3 4 3 2 1))" ]) Then it goes through *exprs-to-test*, evaluates them all, and prints the output like this: (doseq [exstr *exprs-to-test*] (do (println "===" (first (read-string exstr)) "=========================") (println "Code: " exstr) (println "Eval: " (eval (read-string exstr))) ) ) The above code is all working fine. However, (read-string exstr) is repeated so I tried to use let to eliminate the repetition like so: (doseq [exstr *exprs-to-test*] (let [ex (read-string exstr)] ( (do (println "===" (first ex) "=========================") (println "Code: " exstr) (println "Eval: " (eval ex)) ) )) ) But this works once for the first item in *exprs-to-test*, then crashes with a NullPointerException. Why is the addition of let causing the crash?

    Read the article

  • Both Flash and Alternate Displaying In Firefox, Nothing but Errors in IE (sIFR)

    - by Tom Davison
    Hi guys, I've just installed and setup sIFR on my Magento store. An example page can be seen here: http://www.mint-creative.co.uk/shop And you can see it loads the heading brilliantly, but still displays the alternate text-only headline. I've quadruple checked the .css files and everything's loading ok I think. Also, in IE it doesn't display at all and every .css and .js file has an error according to the error log in IE8. Any help on this would be great as it's an urgent project! Cheers.

    Read the article

  • Sound sample recognition library/code

    - by Daniel Mošmondor
    I don't want sound-to-text software. What I need is the following: I'll record multiple (say 50+) audio streams (recordings of radio stations) from that recordings, I'll mark interesting audio clips - their length ranges from 2 to 60 seconds - there will be few thousands of such audio clips library should be able to find other instances of same audio clips from recorded sound streams confidence factor should be reported to used and additional input provided so the recognition could perform better next time Do you know of such software library? LGPL would be most valuable to me, but I can go for commercial license as well.

    Read the article

  • Switching 2003 SRV to 2008 caused Asp.net application not to load DLL

    - by Tom
    Switching aged 2003 SRV to 2008 caused my Asp.net 2 application fail: The application is no more loading the required library DLL from /bin/ folder anymore. What should I change in my code or web.config to make this webapp load OK also in new 2008 server? Now I receive this error when I access the application: This type is in IMPORTS ( Dll ). Compiler Error Message: BC30002: Type 'Facebook.Entity.User' is not defined.

    Read the article

  • Creating a Dynamic calendar in Silverlight

    - by Tom
    I am attempting to create a long range calendar that dynamically loads (and unloads) event data as the user scrolls left or right through time. I'm really struggling to figure out how to lay the basic framework of the UI out and how to dynamically build the interface as the user scrolls by clicking and dragging the mouse in the view area. See the image below for a basic diagram of the intent. Each slice would have potentially multiple rectangles in it for events that occurred on that day (slice). I would like each slice to be a canvas to allow me to position those rectangles appropriately. There are a few problems that I am not yet sure how to tackle but this is the first big one that I've been mulling over for a while and can't quite wrap my head around: I know how to dynamically create controls but how would I go about adding things to one end of the scrollable content while removing things from the other depending on the way the user is scrolling? Any guidance in the right direction would be much appreciated! Thanks.

    Read the article

  • Two forms are being called from one view.One encodes the russian text the doesn't.

    - by Daniel
    The menu I want to show to the users changes depending on their rights After user authentication I redirect to my menu action which calls its view access/menu.html.erb <% if admin? %> <%form_for(:user, :url => {:controller => 'admin_users',:name => session[:username]}) do |admin|%> <ul><h2>Administrator: <%=session[:username]%></h2></ul> <%= render(:partial =>'admin_form',:locals => {:admin => admin})%> <%end%> <%else%> <%form_for(:user, :url => {:controller => 'students',:name => session[:username]}) do |student|%> <ul><h2>???????: <%=session[:surname].to_s + " " + session[:name].to_s%></h2></ul> <%= render(:partial =>'student_form',:locals => {:student => student})%> <%end%> <%end%> And the forms look: _student_form: <table> <ul> <li><%=link_to '?????',{:controller => 'students'}%></li> </ul> <ul> <li><%=link_to '?????? ?????????',{:controller => 'students'}%></li> </ul> <ul> <li><%=link_to '???????? ?????? ????',{:controller => 'students'}%></li> </ul> <ul> <li><%=link_to '???????? ??????',{:controller => 'students'}%></li> </ul> <ul> <td>&nbsp;</td> </ul> </table> _admin_form: <table> <ul> <li><%=link_to '?????????? ????????????????',{:controller => 'AdminUsers',:role_id => 1}%></li> </ul> <ul> <li><%=link_to '?????????? ????????',{:controller => 'AdminUsers',:role_id => 2}%></li> </ul> <ul> <li><%=link_to '?????????? ??????????',{:controller => 'AdminUsers',:role_id => 3}%></li> </ul> <ul> <li><%=link_to '?????????? ???????????',:controller => 'subjects'%></li> </ul> <ul> <td>&nbsp;</td> </ul> </table> If a log in as a student I get: But if I log in as an administrator I get How can this be posible??

    Read the article

  • Alternatives to FastDateFormat for efficient date parsing?

    - by Tom Tucker
    Well aware of performance and thread issues with SimpleDateFormat, I decided to go with FastDateFormat, until I realized that FastDateFormat is for formatting only, no parsing! Is there an alternative to FastDateFormat, that is ready to use out of the box and much faster than SimpleDateFormat? I believe FastDateFormat is one of the faster ones, so anything that is about as fast would do. Just curious , any idea why FastDateFormat does not support parsing? Doesn't it seriously limit its use? Thanks! EDIT Holy crap, I just left a comment and that literally REMOVED a good answer! This appears a serious bug on stackoverflow!

    Read the article

  • How can I get my business objects layer to use the management layer in their methods?

    - by Tom Pickles
    I have a solution in VS2010 with several projects, each making up a layer within my application. I have business entities which are currently objects with no methods, and I have a management layer which references the business entities layer in it's project. I now think I have designed my application poorly and would like to move methods from helper classes (which are in another layer) into methods I'll create within the business entities themselves. For example I have a VirtualMachine object, which uses a helper class to call a Reboot() method on it which passes the request to the management layer. The static manager class talks to an API that reboots the VM. I want to move the Reboot() method into the VirtualMachine object, but I will need to reference the management layer: public void Reboot() { VMManager.Reboot(this.Name); } So if I add a reference to my management project in my entities project, I get the circular dependency error, which is how it should be. How can I sort this situation out? Do I need to an yet another layer between the entity layer and the management layer? Or, should I just forget it and leave it as it is. The application works ok now, but I am concerned my design isn't particularly OOP centric and I would like to correct this.

    Read the article

  • Why do I have to explicitly cast sometimes for varargs?

    - by Daniel Lew
    I've got a Class that uses reflection a lot, so I wrote a method to help out: private <T> T callMethod(String methodName, Class[] parameterTypes, Object[] args) { try { Class c = mVar.getClass(); Method m = c.getMethod(methodName, (Class[]) parameterTypes); return (T) m.invoke(mVar, args); } // Insert exception catching here [...] } This worked well for any method that had parameters, however I had to explicitly cast parameterTypes to Class[] in order for this to work for methods with no parameters (e.g., callMethod('funName', null, null);). I've been trying to figure out why this is the case. It seems to me that if parameterTypes, when null, had no concept of what type it is (Class[]), then I'd need to cast it for getMethod(). But if that's the case, why is getMethod() able to tell the difference between null, and (Class[]) null when the method is invoked?

    Read the article

  • PHP Foreach statement issue. Multiple rows are returned

    - by Daniel Patilea
    I'm a PHP beginner and lately i've been having a problem with my source code. Here it is: <html> <head> <title> Bot </title> <link type="text/css" rel="stylesheet" href="main.css" /> </head> <body> <form action="bot.php "method="post"> <lable>You:<input type="text" name="intrebare"></lable> <input type="submit" name="introdu" value="Send"> </form> </body> </html> <?php //error_reporting(E_ALL & ~E_NOTICE); mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("robo") or die(mysql_error()); $intrebare=$_POST['intrebare']; $query = "SELECT * FROM dialog where intrebare like '%$intrebare%'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); ?> <div id="history"> <?php foreach($row as $rows){ echo "<b>The robot says: </b><br />"; echo $row['raspuns']; } ?> </div> It returns me the result x6 times. This problem appeared when I've made that foreach because I wanted the results to stuck on the page one by one after every sql querry. Can you please tell me what seems to be the problem? Thanks!

    Read the article

  • Using nsIZipWriter or other to compress a string as a string?

    - by Daniel
    I need to be able to take a javascript string, compress it using any fast and available means and get back a binary string/blob. Background: The extension I'm developing needs to send various large content to my server. It does this conveniently by dynamically creating a form, adding fields to the form and posting it. Some of these fields are just too big bandwidth wise for multiple use. I'd like to be able to compress them before adding them and then maybe base64'ing them if the characters cause a problem in the message. Any ideas? I could use nsiZipWriter with temporary files on disk but that is quite ugly and probably sluggish.

    Read the article

  • DIV inside TD to make it appear correctly

    - by Daniel Svensson
    Hi, I have a <table> generated from code-behind and now facing a problem. In one of the TD i need to have a DIV that is setup with JQuery so that when i click a link the DIV slideToggles. Now i need the TD belonging to that TR not to expand the TR. To solve this i have used an old trick that is to place the JQuery DIV inside another surrounding DIV with height 1px and make the TR not expanding with the heigth of the DIV that slides out. In IE the sliding DIV is partially under the table and in Firefox the DIV appears over the table but it's trasparent, the text from the data in the table shows thru. I have tried to alter the Z-index in various ways but it's no good. Anyone that has an idea or alternatively solution that has worked for them. HtmlGenericControl containerDiv = new HtmlGenericControl("div"); containerDiv.ID = "containerDiv"; containerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.Width, "100%"); containerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.Height, "1px"); containerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.ZIndex, "999"); HtmlGenericControl innerDiv = new HtmlGenericControl("div"); innerDiv.ID = System.Guid.NewGuid().ToString() + "_annualDiv"; inner.Style.Add(System.Web.UI.HtmlTextWriterStyle.Width, "100%"); innerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.Height, "300px"); innerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.ZIndex, "1000"); innerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.BorderStyle, "solid"); innerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.BorderColor, "Black"); innerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.BorderWidth, "1px"); innerDiv.Style.Add(System.Web.UI.HtmlTextWriterStyle.BackgroundColor, "white"); innerDiv.InnerHtml = "Here is a list of links coming later"; conDiv.Controls.Add(innerDiv);

    Read the article

  • HTML table manipulation using jQuery

    - by Daniel
    I'm building a site using CakePHP and am currently working on adding data to two separate tables at the same time.. not a problem. The problem I have is that I'm looking to dynamically alter the form that accepts the input values, allowing the click of a button/link to add an additional row of form fields. At the moment I have a table that looks something like this: <table> <thead> <tr> <th>Campus</th> <th>Code</th> </tr> </thead> <tbody> <tr> <td> <select id="FulltimeCourseCampusCode0CampusId" name="data[FulltimeCourseCampusCode][0][campus_id]"> <option value=""></option> <option value="1">Evesham</option> <option value="2">Malvern</option> </select> </td> <td> <input type="text" id="FulltimeCourseCampusCode0CourseCode" name="data[FulltimeCourseCampusCode][0][course_code]"> </td> </tr> </tbody> What I need is for the row within the tbody tag to be replicated, with the minor change of having all the zeros (i.e. such as here FulltimeCourseCampusCode0CampusId and here data[FulltimeCourseCampusCode][0][campus_id]) incremented. I'm very new to jQuery, having done a few minor bits, but nothing this advanced (mostly just copy/paste stuff). Can anyone help? Thank you.

    Read the article

  • How to pop items from a collection in Java?

    - by Tom Brito
    Is there a method in JDK or apache commons to "pop" a list of elements from a java.util.List? I mean, remove the list of elements and return it, like this method: public Collection pop(Collection elementsToPop, Collection elements) { Collection popped = new ArrayList(); for (Object object : elementsToPop) { if (elements.contains(object)) { elements.remove(object); popped.add(object); } } return popped; }

    Read the article

  • How to skip certain tests with Test::Unit

    - by Daniel Abrahamsson
    In one of my projects I need to collaborate with several backend systems. Some of them somewhat lacks in documentation, and partly therefore I have some test code that interact with some test servers just to see everything works as expected. However, accessing these servers is quite slow, and therefore I do not want to run these tests every time I run my test suite. My question is how to deal with a situation where you want to skip certain tests. Currently I use an environment variable 'BACKEND_TEST' and a conditional statement which checks if the variable is set for each test I would like to skip. But sometimes I would like to skip all tests in a test file without having to add an extra row to the beginning of each test. The tests which have to interact with the test servers are not many, as I use flexmock in other situations. However, you can't mock yourself away from reality. As you can see from this question's title, I'm using Test::Unit. Additionally, if it makes any difference, the project is a Rails project.

    Read the article

  • WebClient - The remote server returned an error: (403) Forbidden.

    - by daniel
    Opening a public page from browser works fine. Downloading same page using WebClient throws - (403) Forbidden. What is going on here ? Here is quick copy/paste example (used on console app) to specific page on web: try { WebClient webClient = new WebClient(); string ss = webClient.DownloadString("http://he.wikisource.org/wiki/%D7%A9%D7%95%D7%9C%D7%97%D7%9F_%D7%A2%D7%A8%D7%95%D7%9A_%D7%90%D7%95%D7%A8%D7%97_%D7%97%D7%99%D7%99%D7%9D_%D7%90_%D7%90"); } catch (Exception ex) { throw; }

    Read the article

  • Is O_LARGEFILE needed just to write a large file?

    - by Daniel Trebbien
    Is the O_LARGEFILE flag needed if all that I want to do is write a large file (O_WRONLY) or append to a large file (O_APPEND | O_WRONLY)? From a thread that I read titled "Cannot write 2gb index file" on the CLucene-dev mailing list, it appears that O_LARGEFILE might be needed to write large files, but participants in that discussion are using O_RDWR, not O_WRONLY, so I am not sure.

    Read the article

  • Google Map only showing Grey Blocks on load - Debug Cert has been obtained

    - by Tom
    I am attempting to follow the Google Map View under the views tutorial for the Android. I have followed step by step but still only see grey blocks when viewed. First: I created a Virtual Device using "Google API's(Google Inc.) Platform 2.2 API Level 8" Second: When creating my project I selected "Google API's Google Inc. Platform 2.2 API Level 8". Third: I obtained the SDK Debug Certificate Fouth: Began Coding. Main.xml <?xml version="1.0" encoding="utf-8"?> <com.google.android.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mapview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:clickable="true" android:apiKey="0l4sCTTyRmXTNo7k8DREHvEaLar2UmHGwnhZVHQ" / HelloGoogleMaps.java package com.example.googlemap; import android.app.Activity; import android.os.Bundle; import com.google.android.maps.MapView; import com.google.android.maps.MapActivity; public class HelloGoogleMaps extends MapActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override protected boolean isRouteDisplayed() { return false; } } HelloGoogleMaps Manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.googlemap" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <uses-library android:name="com.google.android.maps" /> <activity android:name=".HelloGoogleMaps" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> </manifest> Any thoughts?? Thanks!

    Read the article

  • Display web page from another site in asp page.

    - by Daniel
    hi all, Our customer has a requirement to extend the functionality of their existing large government project. It is an ASP.NET 3.5 (recently upgraded from 2.0) project. The existing solution is quite a behemoth that is almost unmaintainable so they have decided that they want to provide the new functionality by hosting it on another website that is shown within the existing website. As to how this is best to be done I'm not quite sure right now and if there is any security issues preventing it or that need to be considered. Essentially the user would log on to the existing web site as normal and when cliicking on a certain link the page would load as normal with some kind of frame or control that has within it the contents of the page from the other site. IE. They do not want to simply redirect to the other site they want to show it embedded within the current one such that the existing menus etc are still available. I believe if information needed to be passed to the embedded page it would be done using query strings as I'm not sure if there is even another way to accomplish this. Can anyone give me some pointers on where to start at looking to implement this or any potential pitfalls I should be aware of. Thanks

    Read the article

  • Is it possible to place Joomla under revision control?

    - by Tom
    We are a team of many developers working on a website that uses both Joomla and custom PHP scripts. The problem is that there are multiple developers working on various features which need to update information in Joomla (adding modules, changing existing ones or changing settings) and when one developer changes something, he usually makes the change locally first and then does the same thing (hopefully) on the production server. Not only that this is very error-prone, but the developers often forget to tell other developers about the changes. The custom PHP scripts are easily shared between developers, but the changes in Joomla are often forgotten and they lead to serious conflicts when a developer tries to replicate his local changes in production. I have thought about placing Joomla in a Mercurial repository, but how could we distribute the changes in the database between the development, the testing and the production machines?

    Read the article

< Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >