Daily Archives

Articles indexed Friday March 11 2011

Page 8/13 | < Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • linux nooB: Installing ffmpeg + dependencies on aws linux ami (repo issues)

    - by HdN8
    Im installing ffmpeg to run on an amazon linux ami, and have added the rpmforge repo and the dag repo. Here are some guidelines I'm using for reference: TWoZaO and Razuna The rpmforge repo has ffmpeg, but if you try to install it then it will complain that is missing dependencies (for me libSDL-1.2.so.0()(64bit)). Regardless I will install ffmpeg from svn so I can be sure to enable the options I want (namely libx264). It seems strange to me though that SDL is not in rpmforge or dag, and in according to both of my references above, it should be there. I tried to grab it manually from here, but it needs these dependencies, so no-go: error: Failed dependencies: SDL = 1.2.10-8.el5 is needed by SDL-devel-1.2.10-8.el5.x86_64 alsa-lib-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libGL-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libGLU-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libSDL-1.2.so.0()(64bit) is needed by SDL-devel-1.2.10-8.el5.x86_64 libX11-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libXext-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libXrandr-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libXrender-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libXt-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 Any advice for a linux nooB lost in a mess of repos and dependency errors?

    Read the article

  • Hibernate SetParameter driving me nuts.

    - by cbmeeks
    This works hql = "from State where StateCode like 'T%'"; Query query = session.createQuery(hql); This does not hql = "from State where StateCode like :StateCode"; Query query = session.createQuery(hql); query.setParameter("StateCode", "T%"); I get this 1568 [main] DEBUG org.hibernate.hql.ast.ErrorCounter - throwQueryException() : no errors 1596 [main] DEBUG org.hibernate.hql.antlr.HqlSqlBaseWalker - select << begin [level=1, statement=select] 1608 [main] DEBUG org.hibernate.hql.ast.tree.FromElement - FromClause{level=1} : com.kencogroup.kkms.models.State (no alias) -> state0_ 1610 [main] DEBUG org.hibernate.hql.ast.tree.FromReferenceNode - Resolved : {synthetic-alias} -> {synthetic-alias} 1611 [main] DEBUG org.hibernate.hql.ast.tree.DotNode - getDataType() : StateCode -> org.hibernate.type.StringType@a39137 1611 [main] DEBUG org.hibernate.hql.ast.tree.FromReferenceNode - Resolved : {synthetic-alias}.StateCode -> state0_.StateCode SELECT Exception: java.lang.reflect.UndeclaredThrowableException Notice the UndeclaredThrowableException exception. What am I doing wrong? The database is SQL Server 2008 if that helps. But like I said, other queries work just fine. Thanks

    Read the article

  • How to select difference using sql?

    - by ganuke
    I wrote a sql query to retrieve data as follows: SELECT (MAX (b.filledqty) - MAX (a.filledqty)) AS filledtoday FROM clientordermas a, clientordermas b WHERE a.clordid = 'w9110126' AND b.clordid = 'w9110126' AND (SELECT max(a.price) FROM clientordermas a WHERE a.clordid = 'w9110126') < 1000; There are three records in the table for the given clordid with price values 800, 900 1200. So, what I need is to get the difference between 1200 and 900 which is 300. But, the above statement always returns 0. What I should get is MAX (b.filledqty) retuns 1200 and MAX (a.filledqty) retuns 900. But it is not happening. This is not the exact problem I am facing but a simplified version of it. Can someone please help?

    Read the article

  • Using beautifulsoup to extract text between line breaks (e.g. <br /> tags)

    - by Michael Altman
    I have the following HTML that is within a larger document <br /> Important Text 1 <br /> <br /> Not Important Text <br /> Important Text 2 <br /> Important Text 3 <br /> <br /> Non Important Text <br /> Important Text 4 <br /> I'm currently using BeautifulSoup to obtain other elements within the HTML, but I have not been able to find a way to get the important lines of text between <br /> tags. I can isolate and navigate to each of the <br /> elements, but can't find a way to get the text in between. Any help would be greatly appreciated. Thanks.

    Read the article

  • Bilinear interpolation - DirectX vs. GDI+

    - by holtavolt
    I have a C# app for which I've written GDI+ code that uses Bitmap/TextureBrush rendering to present 2D images, which can have various image processing functions applied. This code is a new path in an application that mimics existing DX9 code, and they share a common library to perform all vector and matrix (e.g. ViewToWorld/WorldToView) operations. My test bed consists of DX9 output images that I compare against the output of the new GDI+ code. A simple test case that renders to a viewport that matches the Bitmap dimensions (i.e. no zoom or pan) does match pixel-perfect (no binary diff) - but as soon as the image is zoomed up (magnified), I get very minor differences in 5-10% of the pixels. The magnitude of the difference is 1 (occasionally 2)/256. I suspect this is due to interpolation differences. Question: For a DX9 ortho projection (and identity world space), with a camera perpendicular and centered on a textured quad, is it reasonable to expect DirectX.Direct3D.TextureFilter.Linear to generate identical output to a GDI+ TextureBrush filled rectangle/polygon when using the System.Drawing.Drawing2D.InterpolationMode.Bilinear setting? For this (magnification) case, the DX9 code is using this (MinFilter,MipFilter set similarly): Device.SetSamplerState(0, SamplerStageStates.MagFilter, (int)TextureFilter.Linear); and the GDI+ path is using: g.InterpolationMode = InterpolationMode.Bilinear; I thought that "Bilinear Interpolation" was a fairly specific filter definition, but then I noticed that there is another option in GDI+ for "HighQualityBilinear" (which I've tried, with no difference - which makes sense given the description of "added prefiltering for shrinking") Followup Question: Is it reasonable to expect pixel-perfect output matching between DirectX and GDI+ (assuming all external coordinates passed in are equal)? If not, why not? Finally, there are a number of other APIs I could be using (Direct2D, WPF, GDI, etc.) - and this question generally applies to comparing the output of "equivalent" bilinear interpolated output images across any two of these. Thanks!

    Read the article

  • Reading files using Windows API

    - by Eli Polonsky
    Hi I'm trying to write a console program that reads characters from a file. i want it to be able to read from a Unicode file as well as an ANSI one. how should i address this issue? do i need to programatically distinguish the type of file and read acoordingly? or can i somehow use the windows API data types like TCHAR and stuff like that. The only differnce between reading from the files is that in Unicode i have to read 2 bytes for a character and in ASNSI its 1 byte? im a little lost with this windows API. would appretiate any help thanks

    Read the article

  • What's an easy way of storing an array of numbers in Javascript that I can add/remove from?

    - by SLC
    In C# I would create a List then I could add and remove numbers very easily. Does identical functionality exist in Javascript, or do I have to write my own methods to search and remove items using a loop? var NumberList = []; NumberList.Add(17); NumberList.Add(25); NumberList.Remove(17); etc. I know I can use .push to add a number, so I guess it's really how to remove an individual number without using a loop that I'm looking for. edit: of course, if there's no other way then I'll use a loop!:)

    Read the article

  • BackgroundWorker - C#

    - by Lars
    Hi. Iam developing a multithreading application using BackroundWorker. In the Do_Work method I call another method, in that method I add alot of data into a list using a while-statement. My goal is to add all the data that in the list to show in a GridView. How can I do that so every time data adds to the list, the gridview uppdates? Instead of waiting that the while-statement has runned finished. When the while-statment adds a value to the list, the value adds into the gridview? It must be in the ProgressChanged, but I dont know how to do that :S Many thanx in advance. /Lars

    Read the article

  • Delete Duplicate records from large csv file C# .Net

    - by Sandhurst
    I have created a solution which read a large csv file currently 20-30 mb in size, I have tried to delete the duplicate rows based on certain column values that the user chooses at run time using the usual technique of finding duplicate rows but its so slow that it seems the program is not working at all. What other technique can be applied to remove duplicate records from a csv file Here's the code, definitely I am doing something wrong DataTable dtCSV = ReadCsv(file, columns); //columns is a list of string List column DataTable dt=RemoveDuplicateRecords(dtCSV, columns); private DataTable RemoveDuplicateRecords(DataTable dtCSV, List<string> columns) { DataView dv = dtCSV.DefaultView; string RowFilter=string.Empty; if(dt==null) dt = dv.ToTable().Clone(); DataRow row = dtCSV.Rows[0]; foreach (DataRow row in dtCSV.Rows) { try { RowFilter = string.Empty; foreach (string column in columns) { string col = column; RowFilter += "[" + col + "]" + "='" + row[col].ToString().Replace("'","''") + "' and "; } RowFilter = RowFilter.Substring(0, RowFilter.Length - 4); dv.RowFilter = RowFilter; DataRow dr = dt.NewRow(); bool result = RowExists(dt, RowFilter); if (!result) { dr.ItemArray = dv.ToTable().Rows[0].ItemArray; dt.Rows.Add(dr); } } catch (Exception ex) { } } return dt; }

    Read the article

  • Any way using JavaScript API via iOS? and problem with FQL queries responses.

    - by Assaf b
    Hi, I'm developing an iPhone application with FB connect, the JavaScript API includes really powerful methods like wait.on for combining requests... Any way using those API methods via iOS and Xcode? about the FQL responses, I'm using both: request:didReceiveResponse: AND request:didLoad: methods. all the FQL queries I send provoke didReceiveResponse but not all of them provoke the second one (didLoad). @"SELECT uid,eid FROM event_member WHERE uid in (select uid2 from friend where uid1=%d limit 100)", userID when the limit is 1-2 it provokes them all, when it grows too 100 (friends to fetch) it provokes only the first.. does anyone know this problem? Thanks!

    Read the article

  • LIBPCAP and WIRESHARK Capture on PPP

    - by user655629
    Hi, I have written a small bridge program using LIBPCAP API. I have installed Winpcap 3.1 Beta for support in order to capture from a PPP interface. What i do is, I capture from the PPP interface through my LIBPCAP program and send the traffic to another Ethernet interface in my computer. Then i connect this Ethernet Interface to another Ethernet Interface at another computer where i monitor it through Wireshark. So in short my PPP-Ethernet Bridge is on computer 1. And Another computer2 directly connected to computer1 on Ethernet monitors the incoming traffic from the bridge through wireshark. The problem i face is that when i capture PPP traffic through wireshark in computer1, i see reasonable delay between the packets. But when i use my LIBPCAP program to capture and relay traffic and check the traffic on computer 2 using Wireshark it gives jumps of 0.5seconds delay after some packets. This is quite unexplainable to me. I dont understand how wireshark PPP direct capture on computer 1 does not give delay and LIBPCAP program is giving delay. I have checked my bridge for Ethernet to Ethernet relaying and there is no delay like the one i am experiencing in case of PPP-Ethernet. a higher delay between packets is acceptable but such a BIG delay after a couple of packets is unacceptable. Please help if you can. Best Regards FIKA

    Read the article

  • How to update control state in asp.net/ajax?

    - by darth_alexious
    I'm trying to update certain controls according to a selection in a dropdown list. For example, in the "selectedIndexChanged" event of a dropDownList, if a user selects the value "sport-car" the text box "payload" is disabled and the textbox "max speed" is enabled. private sub dropDownList1_SelectedIndexChanged(byval sender as object, byval e as eventargs) handles dropDownList1.SelectedIndexChanged If dropDownList1.selectedValue = "sport-car" then textBox_payLoad.enabled = false textBox_maxSpeed.enabled = true end if end sub When I'm doing something like this, the controls aren't enabled/disabled, even the event (wich I've added a breakpoint) seems not to be raised (sometimes several time after it is raised). Also, when the instructions in the condition is executed, nothing changes. What am I doing wrong? Maybe this is a very easy issue, but I'm a begginer in MS Visual Web Developer.

    Read the article

  • linq merge elements with orderby

    - by Sanja Melnichuk
    Hi all. I need to select all terminals sorted by Attributes[2] // get all query IQueryable<ITerminal> itt = repository.Terminals.GetQuery(); // get all with Attributes[2] IQueryable<ITerminal> itt2 = itt .Select(item => new { attrs = item.Attributes[2], term = item }) .OrderBy(x => x.attrs) .Select(x => x.term); Now how to select from itt all terminals but ordered by itt2 results? How to order them by itt2? Example: itt = c,d,r,a,w,b itt2 = a,b,c // after select and after merge: a,b,c d,r,w Thanks all

    Read the article

  • dataset tables row count 'zero'

    - by James123
    I am using dataadapter.Fill() into dataset. But dataset returning tables rows count zero (0). When I ran same sp in sql mgmt. It is returning two tables data. If attributeId = 1 Then spString = "USP_group_1" ElseIf attributeId = 2 Then spString = "USP_group_2" ElseIf attributeId = 3 Then spString = "USP_group_3" End If sqlcmd_q.CommandTimeout = 120 sqlcmd_q.Connection = sqlCnn sqlcmd_q.CommandText = spString sqlcmd_q.CommandType = CommandType.StoredProcedure sqlcmd_q.Parameters.AddWithValue("@client_id", clientId) Try sqlCnn.Open() Dim daGrid As New SqlDataAdapter(sqlcmd_q) daGrid.Fill(dsGrid) daGrid.Dispose() Return dsGrid I don't understand why this happening?

    Read the article

  • Simple github fetch/merge not pulling in remote branch?

    - by chum of chance
    I have a project I forked on github to my repository. I made changes on the "experiment" branch of the project the committed the project to my fork. If you go to my branch on Github you can see the that the experiment branch was correctly committed. I would like to merge the experiment branch with the original repo (which I have rights to). I issued the following commands: git clone [email protected]:originalrepo/theproject.git git checkout -b experiment origin/experiment cd theproject git remote add experiment [email protected]:chumofchance/theproject.git git fetch experiment git merge experiment "Already up to date" However, when I view the project in explorer, it appears that nothing has changed. Am I screwing something up in regards to fetching the experiment branch (vs the master branch)?

    Read the article

  • Console class in java Exception in reading password

    - by satheesh
    Hi, i am trying to use Console class in java. with this code import java.io.Console; public class ConsoleClass { public static void main(String[] args){ Console c=System.console(); char[] pw; pw=c.readPassword("%s","pw :"); for(char ch:pw){ c.format("%c",ch); } c.format("\n"); MyUtility mu =new MyUtility(); while(true){ String name=c.readLine("%s", "input?: "); c.format("output: %s \n",mu.doStuff(name)); } } } class MyUtility{ String doStuff(String arg1){ return "result is " +arg1; } } here i am getting NullPointerException when i tried to run in netbeans but i am not getting any Exception when tried to run in cmd with out netbeans IDE.Why?

    Read the article

  • Selecting a whole database over an individual table to output to file

    - by Daniel Wrigley
    :::::::: EDIT :::::::: New code for people to have a look at, one question I have with this is where do I set were the *.gz file is saved? $backupFile = $dbname . date("Y-m-d-H-i-s") . '.gz'; $command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile"; system($command); Also why the hell can you not reply yo your own post with answering it? :( :::::::: EDIT :::::::: Ok Im having trouble finding out how to select a full database for backup as an *.sql file rather than only an individual table. On the localhost I have several databases with one named "foo" and it is that which I want to backup and not any of the individual tables inside the database "foo". The code to connect to the database; //Database Information $dbhost = "localhost"; $dbname = "foo"; $dbuser = "bar"; $dbpass = "rulz"; //Connect to database mysql_connect ($dbhost, $dbuser, $dbpass) or die("Could not connect: ".mysql_error()); mysql_select_db($dbname) or die(mysql_error()); The code to backup the database; // Grab the time to know when this post was submitted $time = date('Y-m-d-H-i-s'); $tableName = 'foo'; $backupFile = '/sql/backup/'. $time .'.sql'; $query = "SELECT * INTO OUTFILE '". $backupFile ."' FROM ". $tableName .""; $result = mysql_query($query)or die("Database query died: " . mysql_error()); My brain is hurting near to the end of the day so no doubts i've missed something out very obvious. Thanks in advance to anyone helping me out.

    Read the article

  • Recognize Dates In A String

    - by Tim Scott
    I want a class something like this: public interface IDateRecognizer { DateTime[] Recognize(string s); } The dates might exist anywhere in the string and might be any format. For now, I could limit to U.S. culture formats. The dates would not be delimited in any way. They might have arbitrary amounts of whitespace between parts of the date. The ideas I have are: ANTLR Regex Hand rolled I have never used ANTLR, so I would be learning from scratch. I wonder if there are libraries or code samples out there that do something similar that could jump start me. Is ANTLR too heavy for such a narrow use? I have used Regex a lot before, but I hate it for all the reasons that most people hate it. I could certainly hand roll it but I'd rather not re-solve a solved problem. Suggestions? UPDATE: Here is an example. Given this input: This is a date 11/3/63. Here is another one: November 03, 1963; and another one Nov 03, 63 and some more (11/03/1963). The dates could be in any U.S. format. They might have dashes like 11-2-1963 or weird extra whitespace inside like this: Nov   3,   1963, and even maybe the comma is missing like [Nov 3 63] but that's an edge case. The output should be an array of seven DateTimes. Each date would be the same: 11/03/1963 00:00:00.

    Read the article

  • Profiling Silverlight Applications after installing Visual Studio 2010 Service Pack 1

    - by mbcrump
    Introduction Now that the dust has settled and everyone has downloaded and installed Visual Studio 2010 Service Pack 1, its time to talk about a new feature included that will help Silverlight Developers profile their applications. Let’s take a look at what the official documentation says about it: Performance Wizard for Silverlight – taken from VS2010 SP1 KB. Visual Studio 2010 SP1 enables you to tune the Silverlight application performance by profiling the code. A traditional code profiler cannot tune the rendering performance for Silverlight applications. Many higher-level profilers are added to Visual Studio 2010 SP1 so that you can better determine which parts of the application consume time. So, how do you do it? After you finish installing VS2010 SP1, make sure it took by going to Help –> About. You should see SP1Rel under Visual Studio 2010 as shown below. Now, that we have verified you are on the most current release, let’s load up a Silverlight Application. I’m going to take my hobby Silverlight project that I created a month or so ago. The reason that I’m picking this project is that I didn’t focus so much on performance as it was just built for fun and to see what I could do with Silverlight. I believe this makes the perfect application to profile.  After the project is loaded, click on Analyze then Launch Performance Wizard. Go ahead and click on CPU Sampling (recommended). You will notice that it ask which application to target. By Default, it will select the .Web project in an Silverlight Application. Go ahead and leave the default Web Project checked. We are going to leave the client as Internet Explorer. Now, go ahead and click finish. Now your Silverlight Application will launch. While your application is running, you will see the following inside of Visual Studio 2010. Here is where you will need to attach your Silverlight Application to the web application that is current being profiled. Simply click on the  Attach/Detach button below and find your application to attach to the profiler. In my case, I am using IE8 and could find it by the title. After you close your browser, you will notice it generated a report: These files will end with a .VSP If you click on the .VSP you will it generated the following report: We could turn off “Just My Code” but it may pick up things that we didn’t want to profile as shown below: One other feature to note is that you may want to export the data to a CSV or XML. You can do that by looking at the toolbar and clicking the button highlighted below. Conclusion The profiler for Silverlight is a great addition to an already great product. So before you ship a Silverlight Application run it through the profile and see what comes up. Since its included and free I can’t see a reason not to do this. Thanks again for reading and I hope you subscribe to my blog or follow me on Twitter for more Silverlight/WP7 fun.  Subscribe to my feed

    Read the article

  • VS2010 SP1 is now available

    - by TATWORTH
    VS2010 SP1 is now available see: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5&displaylang=en http://weblogs.asp.net/jgalloway/archive/2011/03/09/tips-on-installing-visual-studio-2010-sp1.aspx Please note the warning: "Note: Do not install this service pack if you have downloaded and installed the stand-alone ‘Microsoft Windows SDK for Windows 7 and .NET Framework 4 (Windows SDK v7.1)’ and you are using the x64 or IA64 compilers that were included in that download. Please see the related article for more information." There is an ISO image available -- see the first link above.

    Read the article

  • Free ASP.NET MVC 3 Training Videos from Pluralsight

    - by Vincent Maverick Durano
    Normal 0 false false false EN-PH X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";} For those who are interested: The course looks at the features of the ASP.NET MVC 3 framework, including the new Razor View Engine, the new unobtrusive AJAX features, NuGet Package Management and more.. http://www.asp.net/mvc/pluralsight

    Read the article

  • How do I set zone priority in Microsoft DNS?

    - by Justin
    I have a standard small network setup (20 users) on Active Directory. All Windows machines have a primary DNS server as the AD and a secondary DNS server as Google PDNS. I want to setup a DNS entry that exists in real DNS but set it up on our DC so that local requests would route this public domain to a local development machine on the network. I setup the zone in DNS which results in the clients resolving the public FQDN to our internal IP. However, sometimes it still resolves to the "real" value (I check by pinging it). Is there some way to give the zone definition in my DC DNS higher priority? Or will the client that has secondary public DNS always at sometimes have a competing entry for this zone?

    Read the article

  • SQL Server Express with Advanced Services (with Reporting Services)???

    - by Fretwizard
    I have tried to download SQL Server 2005 Express edition about 4 times trying to find the correct version that has business intelligence studio and reporting services in it? Every time I try to unhide the advanced configuration during install, it's never there... Can anyone point me to the correct download? Looking for 2005 (not 2008) because my work SQL server that I am trying to learn this for is 2005, and the training material I have is for 2005 and VS 2008 does not want to integrate with SQL2008 express.

    Read the article

  • Email server for huge number of subscriber

    - by bogha
    My question is that my company is thinking of providing a free email account for each of its customers. As a new company we will assume that our corporate email system will be MS Exchange server which will support about 1000 employees. They are asking why not adding the customer list to be a part of Exchange users. My suggestion was to separate the two systems, for the corporate we can use Exchange but for customers (around 30000) we have to use a Linux based system. My only argument was that Linux can be used for enterprise services like this and Microsoft may fail. What do you suggest? And if you are with me on choosing Linux as the server platform, what do you suggest to use as an alternative for Exchange in Linux? Thank you.

    Read the article

  • Windows Home Server restore causes computer to be removed from the domain?

    - by unknown (google)
    I restored my Dell M4400 that is a company laptop, and now I get an error when I try to log on and am connected to our corporate network, which says that the domain controller could not be found or that the computer is not part of the domain. Everyone else can log on, so it seems my computer is no longer part of the domain, even though it thinks it is per the settings. One thing of note: my computer crashed on 1/14/10, but I restored from a backup that was made on 12/20/09. So I am not sure if that made a difference? Also, I tried running "gpupdate" to update my group policy, but that did not seem to help. Any ideas? Seems like a bit of a flaw in the backup system for computers that are part of a domain. I guess I wanted to hear from someone with more knowledge about how a computer is recognized as part of a domain to know if this should be expected when doing a restore or if I should file a trouble ticket.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >