Search Results

Search found 3323 results on 133 pages for 'david russell parrish bojrquez'.

Page 12/133 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Retrieving Data from SQL Server within Excel 2007

    - by Russell Giddings
    I have the following requirements I have relational content stored in a SQL Server 2005 database. I want to retrieve this data, transform it and display it in an Excel 2007 document. I would like this to be pulled from within Excel at the click of a button. As far as I can tell I have the following options... Create a view in Sql Server and reference it within a pivot table using a data connection. Create an Excel workbook using VSTO and create a web service which the workbook pulls data from Create a web service and use JScript with XMLHTTP request objects I currently only have a little experience of any of these methods (I'm very familiar with SQL Server although not pivot tables, I've created many web services although I've never used VSTO and I've used javascript extensively, but never in the context of Excel manipulation). Would you recommend one of the above approaches or is there a better way to do this?

    Read the article

  • How do you pass .net objects values around in F#?

    - by Russell
    I am currently learning F# and functional programming in general (from a C# background) and I have a question about using .net CLR objects during my processing. The best way to describe my problem will be to give an example: let xml = new XmlDocument() |> fun doc -> doc.Load("report.xml"); doc let xsl = new XslCompiledTransform() |> fun doc -> doc.Load("report.xsl"); doc let transformedXml = new MemoryStream() |> fun mem -> xsl.Transform(xml.CreateNavigator(), null, mem); mem This code transforms an XML document with an XSLT document using .net objects. Note XslCompiledTransform.Load works on an object, and returns void. Also the XslCompiledTransform.Transform requires a memorystream object and returns void. The above strategy used is to add the object at the end (the ; mem) to return a value and make functional programming work. When we want to do this one after another we have a function on each line with a return value at the end: let myFunc = new XmlDocument("doc") |> fun a -> a.Load("report.xml"); a |> fun a -> a.AppendChild(new XmlElement("Happy")); a Is there a more correct way (in terms of functional programming) to handle .net objects and objects that were created in a more OO environment? The way I returned the value at the end then had inline functions everywhere feels a bit like a hack and not the correct way to do this. Any help is greatly appreciated!

    Read the article

  • How can I get the Hibernate Configuration object from Spring?

    - by Wayne Russell
    Hi, I am trying to obtain Spring-defined Hibernate Configuration and SessionFactory objects in my non-Spring code. The following is the definition in my applicationContext.xml file: Code: <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.hbm2ddl.auto">update</prop> <prop key="hibernate.cglib.use_reflection_optimizer">true</prop> <prop key="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</prop> </props> </property> <property name="dataSource"> <ref bean="dataSource"/> </property> </bean> If I now call getBean("sessionFactory"), I am returned a $Proxy0 object which appears to be a proxy for the Hibernate SessionFactory object. But that isn't what I want - I need the LocalSessionFactoryBean itself because I need access to the Configuration as well as the SessionFactory. The reason I need the Configuration object is that our framework is able to use Hibernate's dynamic model to automatically insert mappings at runtime; this requires that we change the Configuration and rebuild the SessionFactory. Really, all we're trying to do is obtain the Hibernate config that already exists in Spring so that those of our customers that already have that information in Spring don't need to duplicate it into a hibernate.cfg.xml file in order to use our Hibernate features.

    Read the article

  • Sorting tree with other column in SQL Server 2008

    - by bodziec
    Hi, I have a table which implements a tree using hierarchyid column Sample data: People \ Girls \1\ Zoey \1\1\ Kate \1\2\ Monica \1\3\ Boys \2\ Mark \2\1\ David \2\2\ This is the order using hierarchyid column as sort column I would like to sort data using hierarchyid but also using name so it would look like this: People \ Boys \2\ David \2\2\ Mark \2\1\ Girls \1\ Kate \1\2\ Monica \1\3\ Zoey \1\1\ Is there a simple solution to do this? Czy da sie to zrobic w jednym zapytaniu sql ?

    Read the article

  • C# ASP.Net The type or namespace name 'Secure' does not exist in the namespace 'source_extranet'

    - by Louis Russell
    Afternoon all, I really need your help as this is a Nightmare! I was earlier having a problem with referencing a 3rd Party Dll (Here) but have overcome this problem and am now having a problem referencing my own classes! Everything seems fine at build with no errors at all but when I go to run the application it comes up with the following Compilation Error: Compiler Error Message: CS0234: The type or namespace name 'Secure' does not exist in the namespace 'source_extranet' (are you missing an assembly reference?) The line that the Error points to this line in the class: source_extranet.Secure.BackendCustomData newdata = new source_extranet.Secure.BackendCustomData(); This line of code points to a class in the same folder as the calling code class. I have scoured Google looking for an answer and haven't found anything that points me to an answer to my problem. Any help would be AMAZING!

    Read the article

  • How can I extract URLs from plain text with Perl?

    - by Russell C.
    I need the Perl regex to parse plain text input and convert all links to valid HTML HREF links. I've tried 10 different versions I found on the web but none of them seen to work correctly. I also tested other solutions posted on StackOverflow, none of which seem to work. The correct solution should be able to find any URL in the plain text input and convert it to: <a href="$1">$1</a> Some cases other regular expressions I tried didn't handle correctly include: URLs at the end of a line which are followed by returns URLs that included question marks URLs that start with 'https' I'm hoping that another Perl guy out there will already have a regular expression they are using for this that they can share. Thanks in advance for your help!

    Read the article

  • Can someone help me refactor this C# linq business logic for efficiency?

    - by Russell
    I feel like this is not a very efficient way of using linq. I was hoping somebody on here would have a suggestion for a refactor. I realize this code is not very pretty, as I was in a complete rush. public class Workflow { public void AssignForms() { using (var cntx = new ProjectBusiness.Providers.ProjectDataContext()) { var emplist = (from e in cntx.vw_EmployeeTaskLists where e.OwnerEmployeeID == null select e).ToList(); foreach (var emp in emplist) { // if employee has a form assigned: break; if (emp.GRADE > 15 || (emp.Pay_Plan.ToLower().Contains("al") || emp.Pay_Plan.ToLower().Contains("ex"))) { //Assign278(); } else if ((emp.Series.Contains("0905") || emp.Series.Contains("0511") || emp.Series.Contains("0110") || emp.Series.Contains("1801")) || (emp.GRADE >= 12 && emp.GRADE <= 15)) { var emptask = new ProjectBusiness.Providers.EmployeeTask(); emptask.TimespanID = cntx.Timespans.SingleOrDefault(t => t.BeginDate.Year == DateTime.Today.Year & t.EndDate.Year == DateTime.Today.Year).TimespanID; var FormID = (from f in cntx.Forms where f.FormName.Contains("450") select f.FormID).FirstOrDefault(); var TaskStatusID = (from s in cntx.TaskStatus where s.StatusDescription.ToLower() == "not started" select s.TaskStatusID).FirstOrDefault(); Assign450((int)emp.EmployeeID, FormID, TaskStatusID, emptask); cntx.EmployeeTasks.InsertOnSubmit(emptask); } else { //Assign185(); } } cntx.SubmitChanges(); } } private void Assign450(int EmployeeID, int FormID, int TaskStatusID, ProjectBusiness.Providers.EmployeeTask emptask) { emptask.FormID = FormID; emptask.OwnerEmployeeID = EmployeeID; emptask.AssignedToEmployeeID = EmployeeID; emptask.TaskStatusID = TaskStatusID; emptask.DueDate = DateTime.Today; } }

    Read the article

  • How can you increase timeout in Linq2Entities?

    - by Russell Steen
    I'm doing a basic select against a view. Unfortunately the result can be slow and I'm getting timeout errors intermittently. How can I increase the timeout? Using .NET 3.5, Sql Server 2000, Linq2Entities I'm using the very basic query List<MyData> result = db.MyData.Where(x.Attribute == search).ToList(); Fixing the query so that it's faster on the DB side is not an option here. Exact Error: "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding." Update: I'd prefer to just change it for this one query.

    Read the article

  • Casting an object using 'as' returns null: myObject = newObject as MyObject; // null

    - by John Russell
    I am trying to create a custom object in AS3 to pass information to and from a server, which in this case will be Red5. In the below screenshots you will see that I am able to send a request for an object from as3, and receive it successfully from the java server. However, when I try to cast the received object to my defined objectType using 'as', it takes the value of null. It is my understanding that that when using "as" your checking to see if your variable is a member of the specified data type. If the variable is not, then null will be returned. This screenshot illustrates that I am have successfully received my object 'o' from red5 and I am just about to cast it to the (supposedly) identical datatype testObject of LobbyData: However, when testObject = o as LobbyData; runs, it returns null. :( Below you will see my specifications both on the java server and the as3 client. I am confident that both objects are identical in every way, but for some reason flash does not think so. I have been pulling my hair out for a long time, does anyone have any thoughts? AS3 Object: import flash.utils.IDataInput; import flash.utils.IDataOutput; import flash.utils.IExternalizable; import flash.net.registerClassAlias; [Bindable] [RemoteClass(alias = "myLobbyData.LobbyData")] public class LobbyData implements IExternalizable { private var sent:int; // java sentinel private var u:String; // red5 username private var sen:int; // another sentinel? private var ui:int; // fb uid private var fn:String; // fb name private var pic:String; // fb pic private var inb:Boolean; // is in the table? private var t:int; // table number private var s:int; // seat number public function setSent(sent:int):void { this.sent = sent; } public function getSent():int { return sent; } public function setU(u:String):void { this.u = u; } public function getU():String { return u; } public function setSen(sen:int):void { this.sen = sen; } public function getSen():int { return sen; } public function setUi(ui:int):void { this.ui = ui; } public function getUi():int { return ui; } public function setFn(fn:String):void { this.fn = fn; } public function getFn():String { return fn; } public function setPic(pic:String):void { this.pic = pic; } public function getPic():String { return pic; } public function setInb(inb:Boolean):void { this.inb = inb; } public function getInb():Boolean { return inb; } public function setT(t:int):void { this.t = t; } public function getT():int { return t; } public function setS(s:int):void { this.s = s; } public function getS():int { return s; } public function readExternal(input:IDataInput):void { sent = input.readInt(); u = input.readUTF(); sen = input.readInt(); ui = input.readInt(); fn = input.readUTF(); pic = input.readUTF(); inb = input.readBoolean(); t = input.readInt(); s = input.readInt(); } public function writeExternal(output:IDataOutput):void { output.writeInt(sent); output.writeUTF(u); output.writeInt(sen); output.writeInt(ui); output.writeUTF(fn); output.writeUTF(pic); output.writeBoolean(inb); output.writeInt(t); output.writeInt(s); } } Java Object: package myLobbyData; import org.red5.io.amf3.IDataInput; import org.red5.io.amf3.IDataOutput; import org.red5.io.amf3.IExternalizable; public class LobbyData implements IExternalizable { private static final long serialVersionUID = 115280920; private int sent; // java sentinel private String u; // red5 username private int sen; // another sentinel? private int ui; // fb uid private String fn; // fb name private String pic; // fb pic private Boolean inb; // is in the table? private int t; // table number private int s; // seat number public void setSent(int sent) { this.sent = sent; } public int getSent() { return sent; } public void setU(String u) { this.u = u; } public String getU() { return u; } public void setSen(int sen) { this.sen = sen; } public int getSen() { return sen; } public void setUi(int ui) { this.ui = ui; } public int getUi() { return ui; } public void setFn(String fn) { this.fn = fn; } public String getFn() { return fn; } public void setPic(String pic) { this.pic = pic; } public String getPic() { return pic; } public void setInb(Boolean inb) { this.inb = inb; } public Boolean getInb() { return inb; } public void setT(int t) { this.t = t; } public int getT() { return t; } public void setS(int s) { this.s = s; } public int getS() { return s; } @Override public void readExternal(IDataInput input) { sent = input.readInt(); u = input.readUTF(); sen = input.readInt(); ui = input.readInt(); fn = input.readUTF(); pic = input.readUTF(); inb = input.readBoolean(); t = input.readInt(); s = input.readInt(); } @Override public void writeExternal(IDataOutput output) { output.writeInt(sent); output.writeUTF(u); output.writeInt(sen); output.writeInt(ui); output.writeUTF(fn); output.writeUTF(pic); output.writeBoolean(inb); output.writeInt(t); output.writeInt(s); } } AS3 Client: public function refreshRoom(event:Event) { var resp:Responder=new Responder(handleResp,null); ncLobby.call("getLobbyData", resp, null); } public function handleResp(o:Object):void { var testObject:LobbyData=new LobbyData; testObject = o as LobbyData; trace(testObject); } Java Client public LobbyData getLobbyData(String param) { LobbyData lobbyData1 = new LobbyData(); lobbyData1.setSent(5); lobbyData1.setU("lawlcats"); lobbyData1.setSen(5); lobbyData1.setUi(5); lobbyData1.setFn("lulz"); lobbyData1.setPic("lulzagain"); lobbyData1.setInb(true); lobbyData1.setT(5); lobbyData1.setS(5); return lobbyData1; }

    Read the article

  • java.lang.NoSuchMethodError: main Exception in thread "main" .

    - by russell
    I Cant understand why this messege come--------- java.lang.NoSuchMethodError: main Exception in thread "main" . I know it expecting main() method but as i m building an applet which does not contain main method rather contain init() method.So what will i do??My code is s follow --- import java.applet.*; import java.awt.*; public class Ballbewegung1 extends Applet implements Runnable { // Initialisierung der Variablen int x_pos = 10; // x - Position des Balles int y_pos = 100; // y - Position des Balles int radius = 20; // Radius des Balles public void init() { setBackground (Color.blue); } public void start () { // Schaffen eines neuen Threads, in dem das Spiel l?uft Thread th = new Thread (this); // Starten des Threads th.start (); } public void stop() { } public void destroy() { } public void run () { // Erniedrigen der ThreadPriority um zeichnen zu erleichtern Thread.currentThread().setPriority(Thread.MIN_PRIORITY); // Solange true ist l?uft der Thread weiter while (true) { // Ver?ndern der x- Koordinate x_pos ++; // Neuzeichnen des Applets repaint(); try { // Stoppen des Threads f?r in Klammern angegebene Millisekunden Thread.sleep (20); } catch (InterruptedException ex) { // do nothing } // Zur?cksetzen der ThreadPriority auf Maximalwert Thread.currentThread().setPriority(Thread.MAX_PRIORITY); } } public void paint (Graphics g) { g.setColor (Color.red); g.fillOval (x_pos - radius, y_pos - radius, 2 * radius, 2 * radius); } } And I dont know how to use code tag.so plz someone ans.

    Read the article

  • jQuery/Javascript framework efficiency

    - by Russell
    My latest project is using a javascript framework (jQuery), along with some plugins (validation, jquery-ui, datepicker, facebox, ...) to help make a modern web application. I am now finding pages loading slower than I am used to. After some js profiling (thanks VS2010!), it seems a lot of the time is taken procesing inside the framework. Now I understand the more complex the ui tools, the more processing needs to be done. The project is not yet at a large stage and I think would be average functions. At this stage I can see it is not going to scale well. I noticed things like the 'each' command in jQuery takes quite a lot of processing time. Have others experienced some extra latency using JS frameworks? How do I minimise their effect on page performance? Are there best practices on implementation using JS frameworks? Thanks

    Read the article

  • How do I use Perl's WWW::Facebook::API to publish to a user's newsfeed?

    - by Russell C.
    We use Facebook Connect on our site in conjunction with the WWW::Facebook::API CPAN module to publish to our users newsfeed when requested by the user. So far we've been able to successfully update the user's status using the following code: use WWW::Facebook::API; my $facebook = WWW::Facebook::API->new( desktop => 0, api_key => $fb_api_key, secret => $fb_secret, session_key => $query->cookie($fb_api_key.'_session_key'), session_expires => $query->cookie($fb_api_key.'_expires'), session_uid => $query->cookie($fb_api_key.'_user') ); my $response = $facebook->stream->publish( message => qq|Test status message|, ); However, when we try to update the code above so we can publish newsfeed stories that include attachments and action links as specified in the Facebook API documentation for Stream.Publish, we have tried about 100 different ways without any success. According to the CPAN documentation all we should have to do is update our code to something like the following and pass the attachments & action links appropriately which doesn't seem to work: my $response = $facebook->stream->publish( message => qq|Test status message|, attachment => $json, action_links => [@links], ); For example, we are passing the above arguments as follows: $json = qq|{ 'name': 'i\'m bursting with joy', 'href': ' http://bit.ly/187gO1', 'caption': '{*actor*} rated the lolcat 5 stars', 'description': 'a funny looking cat', 'properties': { 'category': { 'text': 'humor', 'href': 'http://bit.ly/KYbaN'}, 'ratings': '5 stars' }, 'media': [{ 'type': 'image', 'src': 'http://icanhascheezburger.files.wordpress.com/2009/03/funny-pictures-your-cat-is-bursting-with-joy1.jpg', 'href': 'http://bit.ly/187gO1'}] }|; @links = ["{'text':'Link 1', 'href':'http://www.link1.com'}","{'text':'Link 2', 'href':'http://www.link2.com'}"]; The above, nor any of the other representations we tried seem to work. I'm hoping some other perl developer out there has this working and can explain how to create the attachment and action_links variables appropriately in Perl for posting to the Facebook news feed through WWW::Facebook::API. Thanks in advance for your help!

    Read the article

  • Linq SqlMethods.Like fails

    - by Russell Steen
    I'm following the tips here, trying to leverage the statement that the sql doesn't get created until the enumerator is tripped. However I get the following error on the code below. I'm using Linq2Entities, not linq2sql. Is there a way to do this in Linq2entities? Method 'Boolean Like(System.String, System.String)' cannot be used on the client; it is only for translation to SQL. query = db.MyTables.Where(x => astringvar.Contains(x.Field1)); if (!String.IsNullOrEmpty(typeFilter)) { if (typeFilter.Contains('*')) { typeFilter = typeFilter.Replace('*', '%'); query = query.Where(x=> SqlMethods.Like(x.Type, typeFilter)); } else { query = query.Where(x => x.Type == typeFilter); } }

    Read the article

  • Run Windows XP on a usb drive virtually on Windows XP?

    - by Russell
    I am sick of not being able to run and install certain applications on my work computer due to admin restrictions (eg: Adobe AIR) . I have heard of smaller versions of Windows running on a usb thumb drive and have looked into it but can't find anything on running windows virtually from a usb drive. I would like to be able to login to this particular computer, insert my usb drive and then open up another version of windows installed on the thumb drive while still being able to use the windows I logged in on (literally be able to alt+tab between the main desktop and the virtual desktop from the usb drive). Is this even possible? For further clarification: The version of windows has to be Windows XP and there is no other option available for what I want to do. Looking forward to a response.

    Read the article

  • Algorithm To Select Most Popular Places from Database

    - by Russell C.
    We have a website that contains a database of places. For each place our users are able to take one of the follow actions which we record: VIEW - View it's profile RATING - Rate it on a scale of 1-5 stars REVIEW - Review it COMPLETED - Mark that they've been there WISH LIST - Mark that they want to go there FAVORITE - Mark that it's one of their favorites In our database table of places each place contains a count of the number of times each action above was taken as well as the average rating given by users. views ratings avg_rating completed wishlist favorite What we want to be able to do is generate lists of the top places using the above information. Ideally, we would want to be able to generate this list using a relatively simple SQL query without needing to do any legwork to calculate additional fields or stack rank places against one another. That being said, since we only have about 50,000 places we could run a nightly cron job to calculate some fields such as rankings on different categories if it would make a meaningful difference in the overall results of our top places. I'd appreciate if you could make some suggestions on how we should think about bubbling the best places to the top, which criteria we should weight more heavily, and given that information - suggest what the MySQL query would need to look like in order to select the top 10 places. One thing to note is that at this time we are less concerned with the recency of a place being popular - meaning that looking at the aggregate information is fine and that more recent data doesn't need to be weighted more heavily. Thanks in advance for your help & advice!

    Read the article

  • JQuery animate div "like" a Zoom

    - by Russell Parrott
    I can never get these to work - sorry - but I I am trying to animate on a mouse over then "re-animate" on a mouse out. I can never get $('#xyz').hover(function(){'something',function(){'somethingelse'}); to work. Hope you guys can help. What I am trying to do is animate + and - 20px (top and left) on some absolutely positioned divs and then add 40px to the width height returning to the original position/width/height on mouse out. I haven't even got to the css widths/heights yet .... Here is my code (which is wrong - well it must be as it doesn't work :-) ) $('.box').hover(function(){ $(this).animate({'top':'-20','left':'-20'},function(){ $(this).animate({'top':'20','left':'20' }); }); Help really appreciated. Thanks in advance

    Read the article

  • Where do interfaces belong in a multitier application

    - by Russell Steen
    So say you have a three tier application with the tiers UI, Services, and Repository for a simple application, let's say saving addresses. If AddressService has an interface IAddressService, where does that interface belong? I know that "in the address service" may seem like an obvious answer, but if it's in the address service it would seem to defeat the point of having the interface such that any service library could be swapped in as long as it implemented IAddressService. (specifically this is in a .net problem space, but it's probably more general so it's tagged architecture)

    Read the article

  • Customising event delegates in the jQuery validation plug-in

    - by Russell
    I am currently setting up the jQuery validation plug-in for use in our project. By default, there are some events automatically set up for handling. I.e. focus in/out, key up events on all inputs fire validation. I want it to only fire when the submit button is clicked. This functionality seems to be in-built into the plug-in, which is making it difficult to do this (without modifying the plug-in code, Not What I Want To Do). I have found the eventDelegate function calls in the plugin code prototype method: $(this.currentForm) .validateDelegate(":text, :password, :file, select, textarea", "focusin focusout keyup", delegate) .validateDelegate(":radio, :checkbox, select, option", "click", delegate); When I remove these lines from the plug-in I get my result, however I would much rather do something Outside the plug-in to achieve this. Can anybody please help me? If you need any more details, please let me know. I have searched google with little success. Thanks

    Read the article

  • HLSL: Enforce Constant Register Limit at Compile Time

    - by Andrew Russell
    In HLSL, is there any way to limit the number of constant registers that the compiler uses? Specifically, if I have something like: float4 foobar[300]; In a vs_2_0 vertex shader, the compiler will merrily generate the effect with more than 256 constant registers. But a 2.0 vertex shader is only guaranteed to have access to 256 constant registers, so when I try to use the effect, it fails in an obscure and GPU-dependent way at runtime. I would much rather have it fail at compile time. This problem is especially annoying as the compiler itself allocates constant registers behind the scenes, on top of the ones I am asking for. I have to check the assembly to see if I'm over the limit. Ideally I'd like to do this in HLSL (I'm using the XNA content pipeline), but if there's a flag that can be passed to the compiler that would also be interesting.

    Read the article

  • How to code Fizzbuzz in F#

    - by Russell
    I am currently learning F# and have tried (an extremely) simple example of FizzBuzz. This is my initial attempt: for x in 1..100 do if x % 3 = 0 && x % 5 = 0 then printfn "FizzBuzz" elif x % 3 = 0 then printfn "Fizz" elif x % 5 = 0 then printfn "Buzz" else printfn "%d" x What solutions could be more elegant/simple/better (explaining why) using F# to solve this problem? Note: The FizzBuzz problem is going through the numbers 1 to 100 and every multiple of 3 prints Fizz, every multiple of 5 prints Buzz, every multiple of both 3 AND 5 prints FizzBuzz. Otherwise, simple the number is displayed. Thanks :)

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >