Search Results

Search found 520 results on 21 pages for 'joshua fox'.

Page 16/21 | < Previous Page | 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • How should I smooth the transition between these two states in flex/flashbuilder

    - by Joshua
    I have an item in which has two states, best described as open and closed, and they look like this: and And what I'd like to do is is smooth the transition between one state and the other, effectively by interpolating between the two points in a smooth manner (sine) to move the footer/button-block and then fade in the pie chart. However this is apparently beyond me and after wrestling with my inability to do so for an hour+ I'm posting it here :D So my transition block looks as follows <s:transitions> <s:Transition id="TrayTrans" fromState="*" toState="*"> <s:Sequence> <s:Move duration="400" target="{footer}" interpolator="{Sine}"/> <s:Fade duration="300" targets="{body}"/> </s:Sequence> </s:Transition> <s:Transition> <s:Rotate duration="3000" /> </s:Transition> </s:transitions> where {body} refers to the pie chart and {footer} refers to the footer/button-block. However this doesn't work so I don't really know what to do... Additional information which may be beneficial: The body block is always of fixed height (perhaps of use for the Xby variables in some effects?). It needs to work in both directions. Oh and the Sine block is defined above in declarations just as <s:Sine id="Sine">. Additionally! How would I go about setting the pie chart to rotate continually using these transition blocks? (this would occur without the labels on) Or is that the wrong way to go about it as it's not a transition as such? The effect I'm after is one where the pie chart rotates slowly without labels prior to a selection of a button below, but on selection the rotation stops and labels appear... Thanks a lot in advance! And apologies on greyscale, but I can't really decide on a colour scheme. Any suggestions welcome.

    Read the article

  • How to post XML document to HTTP with VB.Net

    - by Joshua McGinnis
    I'm looking for help with posting my XML document to a url in VB.NET. Here's what I have so far ... Public Shared xml As New System.Xml.XmlDocument() Public Shared Sub Main() Dim root As XmlElement root = xml.CreateElement("root") xml.AppendChild(root) Dim username As XmlElement username = xml.CreateElement("username") username.InnerText = _username root.AppendChild(username) xml.Save(Console.Out) Dim url = "https://mydomain.com" Dim req As WebRequest = WebRequest.Create(url) req.Method = "POST" req.ContentType = "application/xml" req.Headers.Add("Custom: API_Method") Console.WriteLine(req.Headers.ToString()) This is where things go awry: I want to post the xml, and then print the results to console. Dim newStream As Stream = req.GetRequestStream() xml.Save(newStream) Dim response As WebResponse = req.GetResponse() Console.WriteLine(response.ToString()) End Sub

    Read the article

  • How does C++ free the memory when a constructor throws an exception and a custom new is used

    - by Joshua
    I see the following constructs: new X will free the memory if X constructor throws. operator new() can be overloaded. The canonical definition of an operator new overload is void *operator new(heap h) and the corrisponding operator delete. The most common operator new overload is pacement new, which is void *operator new(void *p) { return p; } You almost always cannot call delete on the pointer given to placement new. This leads to a single question. How is memory cleaned up when X constructor throws and an overloaded new is used?

    Read the article

  • Very simple code for number search gives me infinite loop

    - by Joshua
    Hello, I am a newbie Computer Science high school student and I have trouble with a small snippet of code. Basically, my code should perform a basic CLI search in an array of integers. However, what happens is I get what appears to be an infinite loop (BlueJ, the compiler I'm using, gets stuck and I have to reset the machine). I have set break points but I still don't quite get the problem...(I don't even understand most of the things that it tells me) Here's the offending code (assume that "ArrayUtil" works, because it does): import java.util.Scanner; public class intSearch { public static void main(String[] args) { search(); } public static void search() { int[] randomArray = ArrayUtil.randomIntArray(20, 100); Scanner searchInput = new Scanner(System.in); int searchInt = searchInput.nextInt(); if (findNumber(randomArray, searchInt) == -1) { System.out.println("Error"); }else System.out.println("Searched Number: " + findNumber(randomArray, searchInt)); } private static int findNumber(int[] searchedArray, int searchTerm) { for (int i = 0; searchedArray[i] == searchTerm && i < searchedArray.length; i++) { return i; } return -1; } } This has been bugging me for some time now...please help me identify the problem!

    Read the article

  • Does IE completely ignore cache control headers for AJAX requests?

    - by Joshua Hayworth
    Hello there, I've got, what I would consider, a simple test web site. A single page with a single button. Here is a copy of the source I'm working with if you would like to download it and play with it. When that button is clicked, it creates a JavaScript timer that executes once a second. When the timer function is executed, An AJAX call is made to retrieve a text value. That text value is then placed into the DOM. What's my problem? IE Caching. Crack open Task Manager and watch what happens to the iexplorer.exe process (IE 8.0.7600.16385 for me) while the timer in that page is executing. See the memory and handle count getting larger? Why is that happening when, by all accounts, I have caching turned off. I've got the jQuery cache option set to false in $.ajaxSetup. I've got the CacheControl header set to no-cache and no-store. The Expires header is set to DateTime.Now.AddDays(-1). The headers are set in both the page code-behind as well as the HTTP Handler's response. Anybody got any ideas as to how I could prevent IE from caching the results of the AJAX call? Here is what the iexplorer.exe process looks like in ProcessMonitor. I believe that the activity shown in this picture is exactly what I'm attempting to prevent.

    Read the article

  • Visual PHP GUI IDE

    - by Joshua
    Does anybody know of a reliable, well-made tool for creating standalone desktop applications complete with GUI, using just PHP, or primarily PHP? I enjoy the R.A.D. and many other aspects of PHP and would like to use it for some non server/client projects.

    Read the article

  • PHP debugging or performance Hook

    - by Joshua
    In an interpreted language like PHP it is possible in theory to set up some sort of callback function that would be run indiscriminately after every line of code. I am wondering if such a thing exists in PHP or if such a thing could be accomplished in any way? Such a feature could be useful for diagnostics or performance tests. Does anyone know of such a mechanism in PHP?

    Read the article

  • cakephp htaccess for production install

    - by Joshua Foxworth
    So, I have cakephp installed in what I believed to be the appropriate way for production code with actual cake files above the public_html folder. The app folder is removed from the cake folder and placed at the same level. Loading the home page works fine with the databases and the debug working. However, in trying to run some test files I get a 404. Obviously, I need some way to direct something like www.example.com/posts/index to the proper location. I am not sure as to why this is necessary since the index.php file tells cake where the app directory is located? Also, if I need to use the .htaccess file, how do I point to the proper location and exactly what am I pointed at?

    Read the article

  • Why isn't the new() generic constraint satisfied by a class with optional parameters in the construc

    - by Joshua Flanagan
    The following code fails to compile, producing a "Widget must be a non-abstract type with a public parameterless constructor" error. I would think that the compiler has all of the information it needs. Is this a bug? An oversight? Or is there some scenario where this would not be valid? public class Factory<T> where T : new() { public T Build() { return new T(); } } public class Widget { public Widget(string name = "foo") { Name = name; } public string Name { get; set; } } public class Program { public static void Main() { var widget = new Widget(); // this is valid var factory = new Factory<Widget>(); // compiler error } }

    Read the article

  • Get a random folder C# .NET

    - by Joshua
    Hi. public sealed static class FolderHelper { public static string GetRandomFolder() { // do work } } But.... How? Like start at c:\ (or whatever the main drive is) and then randomly take routes? Not even sure how to do that.

    Read the article

  • Are all <canvas> tag dimensions in pixels?

    - by Simon Omega
    Are all tag dimensions in pixels? I am asking because I understood them to be. But my math is broken or I am just not grasping something here. I have been doing python mostly and just jumped back into Java Scripting. If I am just doing something stupid let me know. For a game I am writing, I wanted to have a blocky gradient. I have the following: HTML <canvas id="heir"></canvas> CSS @media screen { body { font-size: 12pt } /* Game Rendering Space */ canvas { width: 640px; height: 480px; border-style: solid; border-width: 1px; } } JavaScript (Shortened) function testDraw ( thecontext ) { var myblue = 255; thecontext.save(); // Save All Settings (Before this Function was called) for (var i = 0; i < 480; i = i + 10 ) { if (myblue.toString(16).length == 1) { thecontext.fillStyle = "#00000" + myblue.toString(16); } else { thecontext.fillStyle = "#0000" + myblue.toString(16); } thecontext.fillRect(0, i, 640, 10); myblue = myblue - 2; }; thecontext.restore(); // Restore Settings to Save Point (Removing Styles, etc...) } function main () { var targetcontext = document.getElementById(“main”).getContext("2d"); testDraw(targetcontext); } To me this should produce a series of 640w by 10h pixel bars. In Google Chrome and Fire Fox I get 15 bars. To me that means ( 480 / 15 ) is 32 pixel high bars. So I change the code to: function testDraw ( thecontext ) { var myblue = 255; thecontext.save(); // Save All Settings (Before this Function was called) for (var i = 0; i < 16; i++ ) { if (myblue.toString(16).length == 1) { thecontext.fillStyle = "#00000" + myblue.toString(16); } else { thecontext.fillStyle = "#0000" + myblue.toString(16); } thecontext.fillRect(0, (i * 10), 640, 10); myblue = myblue - 10; }; thecontext.restore(); // Restore Settings to Save Point (Removing Styles, etc...) } And get a true 32 pixel height result for comparison. Other than the fact that the first code snippet has shades of blue rendering in non-visible portions of the they are measuring 32 pixels. Now back to the Original Java Code... If I inspect the tag in Chrome it reports 640 x 480. If I inspect it in Fire Fox it reports 640 x 480. BUT! Fire Fox exports the original code to png at 300 x 150 (which is 15 rows of 10). Is it some how being resized to 640 x 480 by the CSS instead of being set to a true 640 x 480? Why, how, what? O_o I confused...

    Read the article

  • Libboost 1.38.0 on Ubuntu 11.04 Natty

    - by scjosh
    I have a Linux/Ubuntu DLL that depends on libboost_thread-mt.so.1.38.0 (As shown in the picture below). I've tried various ways including building my own version of LibBoost 1.38.0 yet none of my methods have worked. I was wondering if 1.38.0 is available precompiled on earlier versions of Ubuntu or if my architecture (64 Bit) is not compatible with LibBoost. Any pointers on how to fix this error are greatly appreciated. http://joshua-ferrara.com/imgoid/images/1332518188.png Best Regards, Josh

    Read the article

  • Strings in .NET are Enumerable

    - by Scott Dorman
    It seems like there is always some confusion concerning strings in .NET. This is both from developers who are new to the Framework and those that have been working with it for quite some time. Strings in the .NET Framework are represented by the System.String class, which encapsulates the data manipulation, sorting, and searching methods you most commonly perform on string data. In the .NET Framework, you can use System.String (which is the actual type name or the language alias (for C#, string). They are equivalent so use whichever naming convention you prefer but be consistent. Common usage (and my preference) is to use the language alias (string) when referring to the data type and String (the actual type name) when accessing the static members of the class. Many mainstream programming languages (like C and C++) treat strings as a null terminated array of characters. The .NET Framework, however, treats strings as an immutable sequence of Unicode characters which cannot be modified after it has been created. Because strings are immutable, all operations which modify the string contents are actually creating new string instances and returning those. They never modify the original string data. There is one important word in the preceding paragraph which many people tend to miss: sequence. In .NET, strings are treated as a sequence…in fact, they are treated as an enumerable sequence. This can be verified if you look at the class declaration for System.String, as seen below: // Summary:// Represents text as a series of Unicode characters.public sealed class String : IEnumerable, IComparable, IComparable<string>, IEquatable<string> The first interface that String implements is IEnumerable, which has the following definition: // Summary:// Exposes the enumerator, which supports a simple iteration over a non-generic// collection.public interface IEnumerable{ // Summary: // Returns an enumerator that iterates through a collection. // // Returns: // An System.Collections.IEnumerator object that can be used to iterate through // the collection. IEnumerator GetEnumerator();} As a side note, System.Array also implements IEnumerable. Why is that important to know? Simply put, it means that any operation you can perform on an array can also be performed on a string. This allows you to write code such as the following: string s = "The quick brown fox";foreach (var c in s){ System.Diagnostics.Debug.WriteLine(c);}for (int i = 0; i < s.Length; i++){ System.Diagnostics.Debug.WriteLine(s[i]);} If you executed those lines of code in a running application, you would see the following output in the Visual Studio Output window: In the case of a string, these enumerable or array operations return a char (System.Char) rather than a string. That might lead you to believe that you can get around the string immutability restriction by simply treating strings as an array and assigning a new character to a specific index location inside the string, like this: string s = "The quick brown fox";s[2] = 'a';   However, if you were to write such code, the compiler will promptly tell you that you can’t do it: This preserves the notion that strings are immutable and cannot be changed once they are created. (Incidentally, there is no built in way to replace a single character like this. It can be done but it would require converting the string to a character array, changing the appropriate indexed location, and then creating a new string.)

    Read the article

  • Flex textarea control not updating properly.

    - by ielashi
    I am writing a flex application that involves modifying a textarea very frequently. I have encountered issues with the textarea sometimes not displaying my modifications. The following actionscript code illustrates my problem: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600"> <mx:TextArea x="82" y="36" width="354" height="291" id="textArea" creationComplete="initApp()"/> <mx:Script> <![CDATA[ private var testSentence:String = "The big brown fox jumps over the lazy dog."; private var testCounter:int = 0; private function initApp():void { var timer:Timer = new Timer(10); timer.addEventListener(TimerEvent.TIMER, playSentence); timer.start(); } private function playSentence(event:TimerEvent):void { textArea.editable = false; if (testCounter == testSentence.length) { testCounter = 0; textArea.text += "\n"; } else { textArea.text += testSentence.charAt(testCounter++); } textArea.editable = true; } ]]> </mx:Script> </mx:Application> When you run the above code in a flex project, it should repeatedly print, character by character, the sentence "The big brown fox jumps over the lazy dog.". But, if you are typing into the textarea at the same time, you will notice the text the timer prints is distorted. I am really curious as to why this happens. The single-threaded nature of flex and disabling user input for the textarea when I make modifications should prevent this from happening, but for some reason this doesn't seem to be working. I must note too that, when running the timer at larger intervals (around 100ms) it seems to work perfectly, so I am tempted to think it's some kind of synchronization issue in the internals of the flex framework. Any ideas on what could be causing the problem?

    Read the article

  • How can I merge multiple Compass Resources into one, with one score?

    - by Brent Fisher
    I am trying to integrate compass into my platform using the JDBC ResultSetToResourceMapping. What I want to do is set it up so that I could have multiple result set mappings, tied to one Resource, that produces one result, with one score, and a merged score. I have tried to trick Compass into doing this by mapping the same id across them, even though the property fields are different, but it just ends up giving me separate hits for each. E.g. I have the following Data Model, Cases and Comments. One case might have several comments. Say I search for a term that appears in multiple comments. Right now, I a hit for each one, each with a different score. Is there a way that I could merge or aggregate those hits into one hit? Say, instead of Score Entity ID Snippets 100.0% Case 3558 ... The fox jumped over the lazy dog ... 60.0% Case 3558 ... In Alabama today, three jumping turtles were ... 25.0% Case 3558 ... Three jumpers fled the scene... I get Score Entity ID Snippets 100.0% Case 3558 The fox jumped over the lazy dog ...In Alabama today, three jumping turtles were ... Three jumpers fled the scene... Where the latter score is an aggregated score.

    Read the article

  • Table cell doesn't obey vertical-align CSS declaration when it contains a floated element

    - by mikez302
    I am trying to create a table, where each cell contains a big floated h1 on the left side, and a larger amount of small text to the right of the big text, vertically centered. However, the small text is showing up at the top of each cell, despite that it has a "vertical-align: middle" declaration. When I remove the big floated element, everything looks fine. I tested it in recent versions of IE, Firefox, and Safari, and this happened in every case. Why is this happening? Does anyone know of a way around it? Here is an example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> <title>vertical-align test</title> <style type="text/css"> td { border: solid black 1px; vertical-align: middle; font-size: 12px} h1 { font-size: 40px; float: left} </style> </head> <body> <table> <tr> <td><h1>1</h1>The quick brown fox jumps over the lazy dog.</td> <td>The quick brown fox jumps over the lazy dog.</td> </tr> </table> </body></html> Notice that the small text in the first cell is at the top for some reason, but the text in the 2nd cell is vertically centered.

    Read the article

  • Time with and without OpenMP

    - by was
    I have a question.. I tried to improve a well known program algorithm in C, FOX algorithm for matrix multiplication.. relative link without openMP: (http://web.mst.edu/~ercal/387/MPI/ppmpi_c/chap07/fox.c). The initial program had only MPI and I tried to insert openMP in the matrix multiplication method, in order to improve the time of computation: (This program runs in a cluster and computers have 2 cores, thus I created 2 threads.) The problem is that there is no difference of time, with and without openMP. I observed that using openMP sometimes, time is equivalent or greater than the time without openMP. I tried to multiply two 600x600 matrices. void Local_matrix_multiply( LOCAL_MATRIX_T* local_A /* in */, LOCAL_MATRIX_T* local_B /* in */, LOCAL_MATRIX_T* local_C /* out */) { int i, j, k; chunk = CHUNKSIZE; // 100 #pragma omp parallel shared(local_A, local_B, local_C, chunk, nthreads) private(i,j,k,tid) num_threads(2) { /* tid = omp_get_thread_num(); if(tid == 0){ nthreads = omp_get_num_threads(); printf("O Pollaplasiamos pinakwn ksekina me %d threads\n", nthreads); } printf("Thread %d use the matrix: \n", tid); */ #pragma omp for schedule(static, chunk) for (i = 0; i < Order(local_A); i++) for (j = 0; j < Order(local_A); j++) for (k = 0; k < Order(local_B); k++) Entry(local_C,i,j) = Entry(local_C,i,j) + Entry(local_A,i,k)*Entry(local_B,k,j); } //end pragma omp parallel } /* Local_matrix_multiply */

    Read the article

  • Why C++ is an abomination [closed]

    - by Chander Shivdasani
    Possible Duplicate: Why do so many people dislike C++? I was reading the blog by Peter Seibel (Author of Coders at Work) where brilliant programmers like Ken Thompson, Joshua Bloch and Guy Steele have despised c++ to no end. What is it in C++ that people hate so much? And despite so much hate towards it, companies like Google are still using it, and some of the programmers who snubbed C++ have worked or are already working at Google. So, what is it in the language that despite so much hate from top programmers, it's still used at most of the places? I haven't really used C++ beyond academic projects, so i don't know much about the disadvantages of the language. What do programmers here think about it? --Chander

    Read the article

  • Encrypted Home directory not auto mounting

    - by Valorin
    I somehow managed to break auto-mounting for my encrypted home directory. Every time I login via SSH, I see this: valorin@joshua:~$ ls -la total 44 dr-x------ 3 valorin valorin 4096 2012-03-17 17:10 . drwxr-xr-x 7 root root 4096 2012-03-17 11:45 .. lrwxrwxrwx 1 valorin valorin 56 2012-03-08 20:37 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop -rw------- 1 valorin valorin 917 2012-03-17 19:24 .bash_history drwx------ 3 valorin valorin 4096 2012-03-16 17:58 .cache lrwxrwxrwx 1 valorin valorin 33 2012-03-08 20:37 .ecryptfs -> /home/.ecryptfs/valorin/.ecryptfs -rw-r--r-- 1 root root 21954 2012-03-08 20:35 .face lrwxrwxrwx 1 valorin valorin 32 2012-03-08 20:37 .Private -> /home/.ecryptfs/valorin/.Private lrwxrwxrwx 1 valorin valorin 52 2012-03-08 20:37 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt -rw------- 1 root root 703 2012-03-17 17:10 .viminfo Any ideas what I've done, and how I can fix it?

    Read the article

  • Disconnected Online Customer Experience? Connect It with Oracle WebCenter

    - by Christie Flanagan
    Engage. Empower. Optimize. Today's customers have higher expectations and more choices than ever before. Successful organizations must deliver an engaging online experience that is personalized, interactive and consistent across all phases of the customer journey. This requires a new approach that connects and optimizes all customer touch points as they research, select and transact with your brand. Attend this webcast to learn how Oracle WebCenter: Works with Oracle ATG Commerce and Oracle Endeca to deliver consistent and engaging browsing, shopping and search experiences across all of your customer facing websites Enables you to optimize the performance of your online initiatives through integration with Oracle Real-Time Decisions for automated targeting and segmentation Connects with Siebel CRM to maintain a single view of the customer and integrate campaigns across channels Register now for the Webcast. Register Now Thurs., November 8, 2012 10 a.m. PT / 1 p.m. ET Presented by: Joshua DuhlSenior Principal Product ManagerOracle WebCenter Christie FlanaganDirector of Product MarketingOracle WebCenter

    Read the article

  • Make the Web Fast: Automagic site optimization with mod_pagespeed 1.0!

    Make the Web Fast: Automagic site optimization with mod_pagespeed 1.0! Ask and vote for questions at: bit.ly mod_pagespeed is an open-source Apache module that automatically optimizes web pages and resources on them: images, CSS, JavaScript, and much more. In this episode, we'll catch up with Joshua Marantz, the tech lead of the project at Google and talk about the history of mod_pagespeed, its fast growing adoption (130K+ sites!), technical architecture and how it works under the hood. Finally, we'll talk about the upcoming 1.0 release milestone for the project. If you're curious about mod_pagespeed, then this is definitely the show you won't want to miss! From: GoogleDevelopers Views: 0 0 ratings Time: 00:00 More in Science & Technology

    Read the article

  • Make the Web Fast: Automagic site optimization with mod_pagespeed 1.0!

    Make the Web Fast: Automagic site optimization with mod_pagespeed 1.0! mod_pagespeed is an open-source Apache module that automatically optimizes web pages and resources on them: images, CSS, JavaScript, and much more. In this episode, we'll catch up with Joshua Marantz, the tech lead of the project at Google and talk about the history of mod_pagespeed, its fast growing adoption (130K+ sites!), technical architecture and how it works under the hood. Finally, we'll talk about the upcoming 1.0 release milestone for the project. If you're curious about mod_pagespeed, then this is definitely the show you won't want to miss! From: GoogleDevelopers Views: 2 0 ratings Time: 01:05:06 More in Science & Technology

    Read the article

  • Get a new instance with StructureMap

    - by Aligned
    It took me too long to figure this out, so hopefully it will help you. StructureMap has way that will create a new instance of the object every time, instead of storing this in the container. I’m going to use this for the DBContext and for WCF Service references. Since the ObjectFactory is a static class, MVC will have these stored in memory without this. Credit goes to Joshua Flanagan for answering my question.[TestMethod] public void GetConcreteInstanceOf_ShouldReturn_DifferentInstance() { ObjectFactory.Initialize(registry => { // set it up so that it's new every time // use this for DBContext and service references registry.For<ISystemDataService>().Use(() => new SystemDataService()); }); ISystemDataService result = Resolver.GetConcreteInstanceOf<ISystemDataService>(); ISystemDataService result2 = Resolver.GetConcreteInstanceOf<ISystemDataService>(); Assert.AreNotSame(result, result2); }

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21  | Next Page >