sub

How to zoom in a Picturebox with scrollwheel in vb.net

匿名 (未验证) 提交于 2019-12-03 01:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using a set of graphics overlays to draw an image inside a picturebox control using the graphics object. I have placed the Picturebox inside a Panel and set the Panel to autoscroll. What I need to know how to do now is use the Mouse scroll wheel to blow up the size of the picture in small increments while maintaining the quality of the image drawn. Anyone know how to do this? When I update with Abdias Software code below, the picture starts out smaller when Sizemode property of picturebox is set to StretchImage. I have a pan feature with

Loop through files in a folder using VBA?

匿名 (未验证) 提交于 2019-12-03 01:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to loop through the files of a directory using vba in Excel 2010. In the loop, I will need the filename, and the date at which the file was formatted. I have coded the following which works fine if the folder has no more then 50 files, otherwise it is ridiculously slow (I need it to work with folders with >10000 files). The sole problem of this code is that the operation to look up file.name takes extremely much time. Code that works but is waaaaaay too slow (15 seconds per 100 files): Sub LoopThroughFiles() Dim MyObj As Object,

Cross-thread operation not valid

匿名 (未验证) 提交于 2019-12-03 01:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was doing the following to try out threadings but get the 'Cross-Threading' error in the line txtBox.Text = DataGridView2.Rows.Item(iloop).Cells(3).Value , anyone can point out what's wrong, thanks: Dim lm As New Thread(AddressOf load_movie) Dim lt As New Thread(AddressOf load_timings) lm.Start() lt.Start() Private Sub load_movie() For iloop As Integer = 0 To DataGridView1.Rows.Count - 2 Dim Cstring As String = "txt_Movie_0" & iloop.ToString For Each cCtrl As Control In Panel1.Controls If TypeOf cCtrl Is TextBox Then Dim txtBox As TextBox

Route to multiple sub folders in CodeIgniter

匿名 (未验证) 提交于 2019-12-03 01:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a admin folder set up in my controllers directory, under that i have 3 seperate sub-folders with controllers inside of them. -- Controllers ---- Admin ------ Dashboard -------- dashboard . php -------- file . php ------ Members -------- members . php -------- file . php ------ Settings -------- settings . php -------- file . php I tried routing it in the routes.php file like this $route [ 'admin/(:any)/(:any)' ] = 'admin/$1/$2' ; $route [ 'admin/(:any)' ] = 'admin/$1/$1' ; $route [ 'admin' ] = 'admin/index' ; What do I do to

How to proxy calls to specific URL to deluge using NGINX?

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to use NGINX to as a proxy to get to Deluge which is inside my home network (NGINX is publically available). This configuration works: location 8112; location / { proxy_pass http://deluge_address:8112; } However I'd like to use an address in form of http://nginx_address/deluge to be proxied to internal http://deluge_address:8112 . I tried the following: location /deluge/ { proxy_pass http://deluge_address:8112/; } (I tried different combinations of trailing / - none work). But I get 404 Not found instead. I have some knowledge about

Render recursively a nested data in React

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How would i go about rendering a menu with nested items with an an unknown amount of children in react from an object like in the following example? [ { title: "Top level 1", slug: "top-level-1", children: [ { title: "Sub level 1", slug: "sub-level-1", children: [ { title: "Sub Sub Level 1" slug: "sub-sub-level-1" } ] } { title: "Sub level 2", slug: "sub-level-2" } ] }, { title: "Top level 2", slug: "top-level 2" } ] 回答1: Codesandbox example You just have to recursively call Menu component for its children to display and pass as a data prop.

How do I make private functions in a Perl module?

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working on a little Perl module and for some reason I had the test driver script that was using my new module call one of the functions that I thought would be private, and it was successful. I was surprised, so I started searching google and I couldn't really find any documentation on how to make private functions in Perl modules... I saw one place that said to put a semicolon after the closing brace of your "private" function, like this: sub my_private_function { ... }; I tried that, but my driver script could still access the

IFERROR in in this macro?

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: The problem is that when I change the value in I16 or I17 I get an error. How can I prevent this error from happening? I check in I16 and I17 for the sheetnames, because every week an updated sheet comes available. Thank you Sub Compare () Call compareSheets ( range ( "I16" ). Value , range ( "I17" ). Value ) End Sub Sub compareSheets ( Sofon As String , Sofon2 As String ) Dim mycell As range Dim mydiffs As Integer For Each mycell In ActiveWorkbook . Worksheets ( Sofon2 ). range ( "M:M" ) If Not mycell . Value = ActiveWorkbook .

How to select from subquery using Laravel Query Builder?

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'd like to get value by the following SQL using Eloquent ORM. - SQL SELECT COUNT(*) FROM (SELECT * FROM abc GROUP BY col1) AS a; Then I considered the following. - Code $sql = Abc::from('abc AS a')->groupBy('col1')->toSql(); $num = Abc::from(\DB::raw($sql))->count(); print $num; I'm looking for a better solution. Please tell me simplest solution. 回答1: In addition to @delmadord's answer and your comments: Currently there is no method to create subquery in FROM clause, so you need to manually use raw statement, then, if necessary, you will

How to select a subset of results from a select statement

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a table that stores RDF triples: triples(triple_id, sub_id, pre_id, obj_id) The method (I need to write) will receive an array of numbers which correspond to pre_id values. I want to select all sub_id values that have a corresponding pre_id for all the pre_ids in the array that is passed in. E.g. if I had a single pre_id values passed in... lets call the value passed in preId, I would do: select sub_id from triples where pre_id=preId; However since I have mutliple pre_id values I want to keep iterating through the pre_id