Search Results

Search found 305 results on 13 pages for 'victor f'.

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

  • Read and write directly from and to compressed files in C

    - by victor
    Hi, in Java I think it is possible to cruise through jar files like they were not compressed. Is there some similar (and portable) thing in C/C++ ? I would like to import binary data into memory from a large (zipped or similar) file without decompressing to disk first and afterwards writing to disk in a compressed way. Maybe some trick with shell pipes and the zip utility?

    Read the article

  • SimpleDB to ActiveResource. Rails

    - by Victor P
    Im looking for a way to map an ActiveResource to SimpleDB I want to avoid plugins/gems as all I have used are outdated/buggy/not mantained It doesnt seem hard, I wonder if any of you have succesfully implemented a rails app with simpleDB as an Active Resource. How did you do it? Thanks.

    Read the article

  • C# Operator Overloading post-fix increment

    - by Victor
    I'm coding a date class and am having trouble with the post-fix increment (the prefix increment seems fine). Here is the sample code: public class date { int year, month, day; public date(int d, int m, int y) { day = d; month = m; year = y; } static public date operator ++(date d) { return d.Next(d); } } The method "Next(date d)" takes a date and returns tomorrows date (I left it out for brevity). I'm to young in C# to understand why the prefix is fine but postfix increment does nothing. But remember in C++ we would have to have two methods instead of just one - for prefix and postfix increments. Also no errors or warnings on compile.

    Read the article

  • overflow-y hides page contents in a webkit browsers (Chrome and Safari)

    - by Victor F
    Hi, I am currently making our website to be supported by all major browsers and I've met a very strange problem - oveflow-y attribute caused my data to be hidden. Below I've got an oversimplified code sample that works in IE and Firfox, but which doesn't work in Safari and Chrome. This is a 100% valid code and I am not sure why it doesn't display properly in webkit browsers. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body style="height: 100%;"> <form action="Webkit_Problem.html" style="height: 100%;"> <table style="height: 100%;> <tr> <td> <div style="overflow-y: auto; height: 100%;> THIS SHOULD BE VISIBLE </div> </td> </tr> </table> </form> </body> </html> http://www.alocet.com/VictorsTestFolder/Webkit_Problem.html (Live sample here) The only way to get it working is either remove the height:100% attributes for div or a table tag (which will ruin the purpose of my html), or add height:100% to html tag Does anyone has any suggestions? Thank you

    Read the article

  • How to write scripts that can run in bash and csh?

    - by Victor Liu
    I'm not sure if this is even possible, but is there a way to write shell scripts that can be interpreted by both the Bourne shell as well as C shell? I want to avoid simply checking for the shell and running a shell-specific code. If this is possible, are there any guides on how to do it? I have always written my scripts for Bourne shell syntax, and I know next to nothing about csh, so this may be a stupid question. I have Google'd for the differences between shells, but there is little information (as far as I can tell) on its implications for scripting.

    Read the article

  • Replace html tags

    - by Victor Sanchez
    I need replace some tags in HTML: Original: <span class="a">text</span><span class="a">text</span><span id="b">text</span> Result: <b>text</b><b>text</b><span id="b">text</span> I tried using HTML::Manipulator but did not succeed.

    Read the article

  • XML parsing to plist iPhone SDK

    - by victor
    Hi, guys. Could you, please, help me with parsing of this XML code: <?xml version="1.0" encoding="utf-8"?> <stuff> <parts> <part id='327'> <name>Logitech MX500</name> <serial>618163558491989</serial> <account>ASDALSKD</account> <number>987 789 456</number> <alarm>alarm1</alarm> </part> <part id='846'> <name>Logitech MX510</name> <serial>871351434945431</serial> <account>KJSDAKLJFA</account> <number>454 564 131</number> <alarm>alarm2</alarm> </part> </parts> <info>Information</info> </stuff> And save data to plist file stuff.plist in this format: 327 NSArray Name NSString Logitech MX500 Serial NSString 618163558491989 Account NSString ASDALSKD Number NSString 987 789 456 Alarm NSString alarm1 846 NSArray Name NSString Logitech MX510 Serial NSString 871351434945431 Account NSString KJSDAKLJFA Number NSString 454 564 131 Alarm NSString alarm2

    Read the article

  • How can I read this IIS error log?

    - by Victor Rodrigues
    I'm using Debug Diagnostic Tool, trying to understand why around 5% of the requests that are sent to my webservice just crash, without necessarily throw any error inside my application. One of the errors this tool took is below. Can anyone here understand exactly what could be happening? Thanks! [6/17/2010 5:32:58 PM] First chance exception - 0xe0434f4d caused by thread with system id 1736 [6/17/2010 5:32:58 PM] Stack Trace ChildEBP RetAddr Args to Child WARNING: Stack unwind information not available. Following frames may be wrong. 1c5bec58 79ef2bbc e0434f4d 00000001 00000001 kernel32!RaiseException+0x3c 1c5becb8 79fccf80 0a6d4998 00000000 00000000 mscorwks!GetMetaDataInternalInterface+0x84a9 1c5bed7c 656cab0e 0a6d4788 1c5bed98 65221345 mscorwks!StrongNameErrorInfo+0x103dc 1c5bed88 65221345 0a6cefb0 1c5bedf8 1c5bee08 System_Data_ni+0x57ab0e 1c5bee0c 79e7e1f3 1c147158 1c147158 0a6d0710 System_Data_ni+0xd1345 1c5bee24 79f7c770 0a6d0710 1c147158 026f25a8 mscorwks!DllUnregisterServerInternal+0x21d7 1c5beee8 79e71b4c 0a6cd9b8 0a6cd994 026f409c mscorwks!CorExitProcess+0x28f9a 1c5bef00 79e821b9 1c5befd8 00000002 1c5befa0 mscorwks+0x1b4c 1c5bef80 79e96531 1c5befd8 00000002 1c5befa0 mscorwks!DllUnregisterServerInternal+0x619d 1c5bf0c8 79e96564 1c531688 1c5bf228 1c5bf120 mscorwks!CoUninitializeEE+0x2ead 1c5bf0e4 79e96582 1c531688 1c5bf228 1c5bf120 mscorwks!CoUninitializeEE+0x2ee0 1c5bf0fc 79f87a83 1c5bf120 1c5bf2e0 79fa6a6b mscorwks!CoUninitializeEE+0x2efe 1c5bf2ec 79f87be2 00629d50 0a6cdae8 0a6d0e04 mscorwks!CorExitProcess+0x342ad 1c5bf3ac 792d5348 00629d90 00000086 1c5bf3c8 mscorwks!CorExitProcess+0x3440c 1c5bf3fc 792d50f6 00629d90 00000086 066a1ae0 mscorlib_ni+0x215348 1c5bf434 792d4fde 00000000 00000000 0a6cd944 mscorlib_ni+0x2150f6 1c5bf488 65e1098e 0a6cd944 00000000 00000000 mscorlib_ni+0x214fde 1c5bf4cc 65e10665 66082f99 0a6ca144 00000000 System_Web_Services_ni+0x13098e 1c5bf4fc 65e10ff7 026c1054 0a6ca168 0a6ace9c System_Web_Services_ni+0x130665 1c5bf510 6dde7666 1c5bf54c 660adb16 6ddd2c34 System_Web_Services_ni+0x130ff7 1c5bf518 660adb16 6ddd2c34 0a6ace8c 0a6c883c System_Web_Extensions_ni+0x1c7666 1c5bf54c 6608132c 1c5bf578 0a6c883c 00000000 System_Web_ni+0x18db16 1c5bf588 6608c5c3 1c5bf5b0 0a6abecc 0a6c8b4c System_Web_ni+0x16132c 1c5bf5dc 660808ac 0a6c8218 0a6abecc 026c0d48 System_Web_ni+0x16c5c3 1c5bf5f0 66083e1c 0a6c883c 026c1054 0a6c883c System_Web_ni+0x1608ac 1c5bf62c 66083ac3 026bc67c 0a6c8400 1c5bf6b0 System_Web_ni+0x163e1c 1c5bf63c 66082c5c 8984fdc8 79e7a6b8 1c5bf858 System_Web_ni+0x163ac3 1c5bf6b0 79f9811e 00000002 01b93b00 026cf6e4 System_Web_ni+0x162c5c 1c5bf768 79f9822b 0017a0d0 1c5bf970 1c5bf9e8 mscorwks!CorExitProcess+0x44948 1c5bf7c4 79f98691 0017a0d0 1c5bf970 1c5bf9e8 mscorwks!CorExitProcess+0x44a55 1c5bf9d0 6a2aa19b 00000001 01b93b00 00000000 mscorwks!CorExitProcess+0x44ebb 1c5bf9f0 6a2aa19b 023ad3f0 01b93b00 00000002 webengine!BufferPoolReleaseBuffer+0x1bb 1c5bfa28 79e72032 79e821f6 e5934469 0017a0d0 webengine!BufferPoolReleaseBuffer+0x1bb 00000000 00000000 00000000 00000000 00000000 mscorwks+0x2032 [6/17/2010 5:33:00 PM] First chance exception - 0xe0434f4d caused by thread with system id 3252 [6/17/2010 5:33:00 PM] Stack Trace ChildEBP RetAddr Args to Child WARNING: Stack unwind information not available. Following frames may be wrong. 01d0ecd8 79ef2bbc e0434f4d 00000001 00000001 kernel32!RaiseException+0x3c 01d0ed38 79fccf80 02748edc 00000000 00000000 mscorwks!GetMetaDataInternalInterface+0x84a9 01d0edfc 656cab0e 02748ccc 01d0ee18 65221345 mscorwks!StrongNameErrorInfo+0x103dc 01d0ee08 65221345 027434d0 01d0ee78 01d0ee88 System_Data_ni+0x57ab0e 01d0ee8c 79e7e1f3 1c147158 1c147158 02744c30 System_Data_ni+0xd1345 01d0eea4 79f7c770 02744c30 1c147158 026f25a8 mscorwks!DllUnregisterServerInternal+0x21d7 01d0ef68 79e71b4c 02741ed8 02741eb4 026f409c mscorwks!CorExitProcess+0x28f9a 01d0ef80 79e821b9 01d0f058 00000002 01d0f020 mscorwks+0x1b4c 01d0f000 79e96531 01d0f058 00000002 01d0f020 mscorwks!DllUnregisterServerInternal+0x619d 01d0f148 79e96564 1c531688 01d0f2a8 01d0f1a0 mscorwks!CoUninitializeEE+0x2ead 01d0f164 79e96582 1c531688 01d0f2a8 01d0f1a0 mscorwks!CoUninitializeEE+0x2ee0 01d0f17c 79f87a83 01d0f1a0 01d0f360 79fa6a6b mscorwks!CoUninitializeEE+0x2efe 01d0f36c 79f87be2 00629d50 02742008 02745324 mscorwks!CorExitProcess+0x342ad 01d0f42c 792d5348 00629d90 00000086 01d0f448 mscorwks!CorExitProcess+0x3440c 01d0f47c 792d50f6 00629d90 00000086 066a1ae0 mscorlib_ni+0x215348 01d0f4b4 792d4fde 00000000 00000000 02741e64 mscorlib_ni+0x2150f6 01d0f508 65e1098e 02741e64 00000000 00000000 mscorlib_ni+0x214fde 01d0f54c 65e10665 66082f99 0273e664 00000000 System_Web_Services_ni+0x13098e 01d0f57c 65e10ff7 026c1054 0273e688 0a6ace9c System_Web_Services_ni+0x130665 01d0f590 6dde7666 01d0f5cc 660adb16 6ddd2c34 System_Web_Services_ni+0x130ff7 01d0f598 660adb16 6ddd2c34 0a6ace8c 0272cce4 System_Web_Extensions_ni+0x1c7666 01d0f5cc 6608132c 01d0f5f8 0272cce4 00000000 System_Web_ni+0x18db16 01d0f608 6608c5c3 01d0f630 0a6abecc 0272cff4 System_Web_ni+0x16132c 01d0f65c 660808ac 0272c6c0 0a6abecc 026c0d48 System_Web_ni+0x16c5c3 01d0f670 66083e1c 0272cce4 026c1054 0272cce4 System_Web_ni+0x1608ac 01d0f6ac 66083ac3 026bc67c 0272c8a8 01d0f730 System_Web_ni+0x163e1c 01d0f6bc 66082c5c 8984fdc8 79e7a6b8 01d0f8d8 System_Web_ni+0x163ac3 01d0f730 79f9811e 00000002 01b93b00 026cf6e4 System_Web_ni+0x162c5c 01d0f7e8 79f9822b 000dcea8 01d0f9f0 01d0fa68 mscorwks!CorExitProcess+0x44948 01d0f844 79f98691 000dcea8 01d0f9f0 01d0fa68 mscorwks!CorExitProcess+0x44a55 01d0fa50 6a2aa19b 00000001 01b93b00 00000000 mscorwks!CorExitProcess+0x44ebb 01d0fa70 6a2aa19b 023ad3f0 01b93b00 00000002 webengine!BufferPoolReleaseBuffer+0x1bb 01d0fac8 79e79cba 79e79ccd 0000000d 00000000 webengine!BufferPoolReleaseBuffer+0x1bb 01d0facc 79e79ccd 0000000d 00000000 79ec3f4b mscorwks+0x9cba 01d0fad8 79ec3f4b 79e7c82c 79ec3f53 f818458d mscorwks+0x9ccd 00000000 00000000 00000000 00000000 00000000 mscorwks!CreateAssemblyNameObject+0x22f40 [6/17/2010 5:33:37 PM] Thread exited. Exiting thread system id - 2144. Exit code - 0x00000000

    Read the article

  • mysqli prepared statements select *

    - by Victor Dallecio
    I've spent this sunday trying to find what is wrong to the following code as it is not counting the rows. Could somebody help me with it? Thanks! /*check if same IP has visited today*/ if ($stmt = $mysqli->query('SELECT * FROM table WHERE colum1 = ? AND colum2 > DATE_SUB(NOW(), INTERVAL 1 DAY)')) { $stmt->bind_param('s', $ip); /* execute query */ $stmt->execute(); /*number of rows */ /*store result when using prepared statements*/ $stmt->store_result(); $row_cnt = $stmt->num_rows; printf("Result set has %d rows.\n", $row_cnt); $stmt->close(); }

    Read the article

  • Rspec Faker has_one fail in view

    - by Victor Martins
    I' trying to fix this for hours... I have this on a controller rspec test: it "show action should render show template" do task = Task.make task.mission = Mission.make get :show, :id => task response.should render_template(:show) end But it fails rendering the view because of this: <%=h @task.mission.name %> I don't get it... :/

    Read the article

  • Rails Layout Rendering with controller condition

    - by Victor Martins
    I don't know what's the best way to doing this. On my application.html.erb I define a header div. My default controller ( root ) is a homepage controller. And I wish that if I'm at index of the homepage the header is rendering with some content, but all other controllers render another content inside that header. How can I make a condition in that header div to render different content based on the controller that's being rendered?

    Read the article

  • linq-to-sql combine .any expression

    - by Victor
    I need to filter out parent by property value of child collection. I am doing something like this: var results = (from c in db.Customers where c.Orders.Any(o => o.Status = (int)Status.Ordered) select c; It's fine but now I need to filter by 2 values, i.e. take all parent records that have any chilren records that have BOTH values: var results = (from c in db.Customers where c.Orders.Any(o => o.Status == (int)Status.Ordered) && (o.Status == (int).Shipped)) select c; Trying something obvious like this doesn't work.

    Read the article

  • Routing is using ID has action and action has ID after submitting a form

    - by Victor Martins
    I have a model User that has_one user_profile and a User_Profile belongs_to user in the User controller I have: def personal @user = User.find_by_id(params[:id]) @user_profile = @user.user_profile @user_profile ||= @user.build_user_profile end def update_personal @user = User.find_by_id(params[:id]) if @user.user_profile.update_attributes(params[:user_profile]) flash[:notice] = "OK" redirect_to @user else flash[:notice] = "Fail" render :action => 'update_personal' end end In my personal.html.erb view I have: <% semantic_form_for @user_profile, :url => { :action => "update_personal"} do |form| %> <%= form.inputs %> <%= form.buttons %> <%end%> And on the rountes I have: map.resources :users, :member => { :personal => :get, :update_personal => :put } Now the strange thing is that I can do: users/1/personal to see the form but when I submit I get this error: Unknown action No action responded to 1. It's trying to find an action with the name 1. Can anyone point me out on the right direction?

    Read the article

  • How decompose NSPredicate into components?

    - by Victor
    Is there any common way to decompose an expression created by [NSPredicate predicateWithFormat] to objects NSComprasionPredicate, NSExpression and other? For below example need to disassemble into components. [NSPredicate predicateWithFormat:@"(0 != SUBQUERY(collection, $x, $x.name == "Name").@Count)"];

    Read the article

  • Android - ListActivity, add Header and Footer view

    - by Victor
    I'm using ListActivity, listview. listView = getListView(); just working perfectly. I added footer view as LayoutInflater inflater = getLayoutInflater(); listView.addFooterView( inflater.inflate( R.layout.footer, null ), null, false); and everything was shiny but ugly, so i wanted to add this footer view (which contains only 1 edittext and only 1 button ) to header of listView as LayoutInflater inflater = getLayoutInflater(); listView.addHeaderView( inflater.inflate( R.layout.footer, null ), null, false); and suddenly everything goes wrong, and i get RuntimeException immediately. Suspended(exception RuntimeException) ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) ActivityThread.access$2200(ActivityThread, Activity$ActiviyRecord, Intent), so on.. Why is it throws exception ? What is different between addFooterView and addHeaderView, and how can i add Header to ListActivity ? UPDATE So as you can read in comments, my logcat still doesn't work, but i just tried next at this moment: } catch(Exception e){ Writer result = new StringWriter(); PrintWriter printWriter = new PrintWriter(result); e.printStackTrace(printWriter); String error = result.toString(); } and afterward i put breakpoint, and i can read error in expressions section. it said : java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called. it was instructive for all of us. After change sort of commands, it works perferctly.

    Read the article

  • Where is the method call in the EXE file?

    - by Victor Hurdugaci
    Introduction After watching this video from LIDNUG, about .NET code protection http://secureteam.net/lidnug_recording/Untitled.swf (especially from 46:30 to 57:30), I would to locate the call to a MessageBox.Show in an EXE I created. The only logic in my "TrialApp.exe" is: public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { MessageBox.Show("This is trial app"); } } Compiled on the Release configuration: http://rapidshare.com/files/392503054/TrialApp.exe.html What I do to locate the call Run the application in WinDBG and break after the message box appears. Get the CLR stack with !clrstack: 0040e840 5e21350b [InlinedCallFrame: 0040e840] System.Windows.Forms.SafeNativeMethods.MessageBox(System.Runtime.InteropServices.HandleRef, System.String, System.String, Int32) 0040e894 5e21350b System.Windows.Forms.MessageBox.ShowCore(System.Windows.Forms.IWin32Window, System.String, System.String, System.Windows.Forms.MessageBoxButtons, System.Windows.Forms.MessageBoxIcon, System.Windows.Forms.MessageBoxDefaultButton, System.Windows.Forms.MessageBoxOptions, Boolean) 0040e898 002701f0 [InlinedCallFrame: 0040e898] 0040e934 002701f0 TrialApp.Form1.Form1_Load(System.Object, System.EventArgs) Get the MethodDesc structure (using the address of Form1_Load) !ip2md 002701f0 MethodDesc: 001762f8 Method Name: TrialApp.Form1.Form1_Load(System.Object, System.EventArgs) Class: 00171678 MethodTable: 00176354 mdToken: 06000005 Module: 00172e9c IsJitted: yes CodeAddr: 002701d0 Transparency: Critical Source file: D:\temp\TrialApp\TrialApp\Form1.cs @ 22 Dump the IL of this method (by MethodDesc) !dumpil 001762f8 IL_0000: ldstr "This is trial app" IL_0005: call System.Windows.Forms.MessageBox::Show IL_000a: pop IL_000b: ret So, as the video mentioned, the call to to Show is 5 bytes from the beginning of the method implementation. Now I open CFFExplorer (just like in the video) and get the RVA of the Form1_Load method: 00002083. After this, I go to Address Converter (again in CFF Explorer) and navigate to offset 00002083. There we have: 32 72 01 00 00 70 28 16 00 00 0A 26 2A 7A 03 2C 13 02 7B 02 00 00 04 2C 0B 02 7B 02 00 00 04 6F 17 00 00 0A 02 03 28 18 00 00 0A 2A 00 03 30 04 00 67 00 00 00 00 00 00 00 02 28 19 00 00 0A 02 In the video is mentioned that the first 12 bytes are for the method header so I skip them 2A 7A 03 2C 13 02 7B 02 00 00 04 2C 0B 02 7B 02 00 00 04 6F 17 00 00 0A 02 03 28 18 00 00 0A 2A 00 03 30 04 00 67 00 00 00 00 00 00 00 02 28 19 00 00 0A 02 5 bytes from the beginning of the implementation should be the opcode for method call (28). Unfortunately, is not there. 02 7B 02 00 00 04 2C 0B 02 7B 02 00 00 04 6F 17 00 00 0A 02 03 28 18 00 00 0A 2A 00 03 30 04 00 67 00 00 00 00 00 00 00 02 28 19 00 00 0A 02 Questions: What am I doing wrong? Why there is no method call at that position in the file? Or maybe the video is missing some information... Why the guy in that video replaces the call with 9 zeros?

    Read the article

  • UI Automation Button Style Enabled

    - by Victor Gaspar
    Hi, I'm evaluating UI Automation for UI testing for that I have a WPF application with the following button defined: <Button Style="{DynamicResource ButtonStyle}" x:Name="MyBtn"/> when I need to visually disable the button I just change the style so the user is aware that the button is disabled (the colour changed) but still the button is internally enabled so I can still launch the OnClick event in order to show a message when the user clicks on a "disabled" button. Now the problem is that I don't know how to check from UI Automation the Style that its currently applied i.e. if the button is disabled or enabled. Do you know how can I do that? In a normal situation I should do something like that: Automation.Condition cEBtn = new PropertyCondition(AutomationElement.AutomationIdProperty, "MyBtn"); AutomationElement mybtnElement = appRegraceElement.FindFirst(TreeScope.Children, cEBtn); bool disMyBtn = (bool)mybtnElement .GetCurrentPropertyValue(AutomationElement.IsEnabledProperty); but in my case the button is always enabled therefore I need to check the Style applied to the button. Thank you very much. Best regards

    Read the article

  • Creating spotlight in OpenGL scene

    - by Victor Oliveira
    Im studying OpenGL and trying to create a spot light at my application. The code that Im using for my #vertex-shader is below: #:vertex-shader #{ #version 150 core in vec3 in_pos; in vec2 in_tc; out vec2 tc; glLightf(GL_LIGHT0, GL_SPOT_CUTOFF, 20.0f); GLfloat spot_direction[] = { -1.0, -1.0, 0.0 }; glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, spot_direction); glEnable(GL_LIGHT0); void main() { vec4 pos= vec4(vec3(1.0)*in_pos - vec3(1.0), 1.0); pos.z=0.0; gl_Position = pos; tc = in_tc; } } The thing is, everytime Im trying to run the code an Error that says: Type: other, Source: api, ID: 131169, Severity: low Message: Framebuffer detailed info: The driver allocated storage for renderbuffer 1. len = 157, written = 0 failed to compile vertex shader of deferred: directional info log for shader deferred: directional vertex info log for shader deferred: directional: ERROR: Unbound variable: when Specifications: Renderer: GeForce GTX 580/PCIe/SSE2 Version: 3.3.0 NVIDIA 319.17 GLSL: 3.30 NVIDIA via Cg compiler Status: Using GLEW 1.9.0 1024 x 768 OS: Linux debian I guess to create this spotlight is pretty much simple, but since Im really new to OpenGL I dont have a clue how to do it until now, even reading sources like: http://www.glprogramming.com/red/chapter05.html#name3 Read also in some place that light spots can get really hard to understand, but I cant avoid this step right now since Im following my lecture schedule. Could anybody help me?

    Read the article

  • Optimize MYSQL Query with Order by

    - by Victor
    Hello, I have seen mysql queries with order by runs slow. Is there any specific way to optimize queries which use order by ? Queries without order by run very fast but with order by its always runs slow. if any one suggest any thing on this as general solutions. Thank You

    Read the article

  • How to build march-0 for different architectures?

    - by Victor Lin
    I have some dylibs to load from python with ctypes. I can load libbass.dylib without problem, but I can't load the self-compiled libmp3lame.dylib. Here is the error I get. OSError: dlopen(libmp3lame.dylib, 6): no suitable image found. Did find: libmp3lame.dylib: mach-o, but wrong architecture Then, I inspect the file type of those libs. Here is the result of libbass.dylib: libbass.dylib: Mach-O universal binary with 2 architectures libbass.dylib (for architecture i386): Mach-O dynamically linked shared library i386 libbass.dylib (for architecture ppc): Mach-O dynamically linked shared library ppc And here is the self-compiled one: libmp3lame.dylib: Mach-O 64-bit dynamically linked shared library x86_64 I did compile the lame library with the install instructions: ./configure make make install I'm new to mac system, here comes the problem: how to build the libmp3lame.dylib so that it supports different architecture I want? Thanks.

    Read the article

  • How to workaround Python "WindowsError messages are not properly encoded" problem?

    - by Victor Lin
    It's a trouble when Python raised a WindowsError, the encoding of message of the exception is always os-native-encoded. For example: import os os.remove('does_not_exist.file') Well, here we get an exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> WindowsError: [Error 2] ???????????: 'does_not_exist.file' As the language of my Windows7 is Traditional Chinese, the default error message I get is in big5 encoding (as know as CP950). >>> try: ... os.remove('abc.file') ... except WindowsError, value: ... print value.args ... (2, '\xa8t\xb2\xce\xa7\xe4\xa4\xa3\xa8\xec\xab\xfc\xa9w\xaa\xba\xc0\xc9\xae\xd7\xa1C') >>> As you see here, error message is not Unicode, then I will get another encoding exception when I try to print it out. Here is the issue, it can be found in Python issue list: http://bugs.python.org/issue1754 The question is, how to workaround this? How to get the native encoding of WindowsError? The version of Python I use is 2.6. Thanks.

    Read the article

  • How to build mach-0 for different architectures?

    - by Victor Lin
    I have some dylibs to load from python with ctypes. I can load libbass.dylib without problem, but I can't load the self-compiled libmp3lame.dylib. Here is the error I get. OSError: dlopen(libmp3lame.dylib, 6): no suitable image found. Did find: libmp3lame.dylib: mach-o, but wrong architecture Then, I inspect the file type of those libs. Here is the result of libbass.dylib: libbass.dylib: Mach-O universal binary with 2 architectures libbass.dylib (for architecture i386): Mach-O dynamically linked shared library i386 libbass.dylib (for architecture ppc): Mach-O dynamically linked shared library ppc And here is the self-compiled one: libmp3lame.dylib: Mach-O 64-bit dynamically linked shared library x86_64 I did compile the lame library with the install instructions: ./configure make make install I'm new to mac system, here comes the problem: how to build the libmp3lame.dylib so that it supports different architecture I want? Thanks.

    Read the article

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