qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
112,464
I have SharePoint list with more than 1000 items(ID's). I'm dumping list with *BASH* script to my server with *curl*: `curl --ntlm -u $curl_account $SITE -o $output_file 2>/dev/null` and I get only 1000 ID's to my *$output\_file*. Is there are some limits or smth to do, that I could get all items? Thanks for any in...
2014/08/20
[ "https://sharepoint.stackexchange.com/questions/112464", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/31504/" ]
add RowLimit=0 ``` http://sharepoint/_vti_bin/owssvr.dll?Cmd=Display&XMLDATA=1&RowLimit=0&List=%7BID1%7D&View=%7BID2%7D ``` Setting the row limit will override the default limit
Try and do it in a loop, record the last id retrieved after each 1000, then add a filter to the call i.e. where ID > lastid. do this until the number of items retrieved is < 1000
328,103
First of all, I don't know if this kind of question is allowed here, so sorry if it isn't. I am looking for a 7400 series register which has common in and out pins (like for the RAM ou EEPROM: ![28C16](https://www.futurlec.com/Memory/28C16.gif)) with a load signal and a store signal. I searched on Google but I didn't ...
2017/09/07
[ "https://electronics.stackexchange.com/questions/328103", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/139408/" ]
After deeper research on the Wikipedia list of the 7400 series (<https://en.wikipedia.org/wiki/List_of_7400_series_integrated_circuits>), I found out the 74299 which has common in/out pins. I searched with the wrong keyword which should have been "bidirectionnal register".
There isn't a register that has common input and output pins, but you can certainly wire up a '373 or '374 (8-bit latch or register with tristate outputs) to achieve that functionality: ![schematic](https://i.stack.imgur.com/5UBPj.png) [simulate this circuit](/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2...
13,740,691
I'm a little bit confused by the behavior of the multiplication operator `*` when scipy sparse matrices are involved. It seems the operator implements matrix multiplication, not component-wise multiplication as it would with numpy arrays. Some code to check this: ``` from scipy.sparse import lil_matrix A = lil_matrix...
2012/12/06
[ "https://Stackoverflow.com/questions/13740691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1050484/" ]
Documentation is indeed scarse. If you are looking for component-wise multiplication you can use `A.multiply(b)`, where b can be an element, vector or matrix: <https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.sparse.csr_matrix.multiply.html>
Yes, it is matrix multiplication in all cases.
25,255,329
I have a query: ``` db.events.aggregate( { $match: { "camera._id": "1NJE48", "start_timestamp": { $lte: 1407803834.07 } } }, { $sort: { "start_timestamp": -1 } }, { $limit: 2 }, { $project: { "_id": 0, "snapshots": 1 } } ) ``` It returns data like so: ``` /* 0 */ { "result" : [ { "s...
2014/08/12
[ "https://Stackoverflow.com/questions/25255329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/145567/" ]
I found out that it is a bug and you have to open Scene Builder from your desktop and: * File>Preferences>Reset To BuiltIn Defaults * File>Open recent>clear menu
I installed scene builder from a different maker (gluon) Works wonderfully. Associate the FXML files in your SO to that they are open by this application instead of the "normal" one and you can forget about this problem.
62,668,365
I want to get the value of a desired variable among several variables in a class When i put string and class in Method, the method returns the value of the variable with the same name as the string received among all variables included in the class. This method can get any type of class. So this method need to use ge...
2020/07/01
[ "https://Stackoverflow.com/questions/62668365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10086945/" ]
your task already defined. if you use ``` #{Class}.GetType().GetProperty(#{VariableName}).GetValue(#{DefinedClass}, null); ``` you can easily get variable from your class with variable name. it returns variable as object. so you need to convert it **Example code** ``` CLASS YourClass = [A CLASS WHICH IS PRE DEFI...
ok, use reflection to get all the variables in the object, then run through a loop checking them against the string of the property name. From there you should be able to return the value. So something like ``` public object FindValByName(string PropName) { PropName = PropName.ToLower(); var props = this.GetT...
181,108
I'm having trouble implementing a concurrent login check. The site needs to prevent more than 5 concurrent sessions for any particular user at one time. **Example:** User Matt can have 5 active sessions. > > If user Matt tries to login with a 6th session, it will remove the session which logged in first & had no ...
2015/03/13
[ "https://wordpress.stackexchange.com/questions/181108", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/69034/" ]
This question made me really interested. Took about 5 hours of my Saturday to create the full solution :) Plugin Limit Login Sessions --------------------------- It doesn't provide a settings page yet, so all options are currently hard coded. The plugin implements the following (according to OP): 1. A user can have...
It is impossible to have an answer for the question as it is being asked because http protocol do not have any long term sessions. A session on http is one request and response. Sessions as we know on the internet are just hacks designed to remove the need to provide login and pass info for every page load. wordpress...
12,378,154
Are there any aspects to the C++ programming language where the code is known to be slower than the equivalent C language? Obviously this would be excluding the OO features like virtual functions and vtable features etc. I am wondering whether, when you are programming in a latency-critical area (and you aren't worrie...
2012/09/11
[ "https://Stackoverflow.com/questions/12378154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997112/" ]
That depends on what you mean by "equivalent". If you compare C's stdio.h with C++'s iostream, stdio.h operations are generally faster (quite a bit faster in some situations). But if you are talking about code written in the subset of C++ that also compiles as valid C, the generated machine code will likely be identica...
If you're using the language that's the intersection of C and C++, then any difference in performance when compiling that code with a C compiler versus a C++ compiler is purely a quality-of-implementation issue; there's no reason one should be faster than the other. Of course in the real world, if you're using C++ you...
12,378,154
Are there any aspects to the C++ programming language where the code is known to be slower than the equivalent C language? Obviously this would be excluding the OO features like virtual functions and vtable features etc. I am wondering whether, when you are programming in a latency-critical area (and you aren't worrie...
2012/09/11
[ "https://Stackoverflow.com/questions/12378154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997112/" ]
Does *Latency critical* mean *as fast as possible* or does it simply mean that *everything has to run in predictable time*? If it is the second case, then the only things that don't run in predictable time are `new`, `delete` and `try/catch`. In embedded programming there are directives to avoid such calls. In other ...
There is no code in C++ whose direct equivalent in C is faster- or, indeed, more maintainable.
12,378,154
Are there any aspects to the C++ programming language where the code is known to be slower than the equivalent C language? Obviously this would be excluding the OO features like virtual functions and vtable features etc. I am wondering whether, when you are programming in a latency-critical area (and you aren't worrie...
2012/09/11
[ "https://Stackoverflow.com/questions/12378154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997112/" ]
Nothing in the C or C++ language standards specifies the speed of any construct (C++ does specify the time complexity of some operations applied to containers, but that's outside the scope of your question). The speed of the code generated for a given construct depends on the compiler used to compile it, and on the sys...
If you're using the language that's the intersection of C and C++, then any difference in performance when compiling that code with a C compiler versus a C++ compiler is purely a quality-of-implementation issue; there's no reason one should be faster than the other. Of course in the real world, if you're using C++ you...
12,378,154
Are there any aspects to the C++ programming language where the code is known to be slower than the equivalent C language? Obviously this would be excluding the OO features like virtual functions and vtable features etc. I am wondering whether, when you are programming in a latency-critical area (and you aren't worrie...
2012/09/11
[ "https://Stackoverflow.com/questions/12378154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997112/" ]
For one example, C++ lacks the keyword `restrict`. Used correctly that sometimes allows the compiler to produce faster code. * it's fairly rare in practice to see benefits from `restrict`, but it happens, * there are plenty of occasions when a C++ or C compiler can deduce (after inlining) that the necessary conditions...
There is no code in C++ whose direct equivalent in C is faster- or, indeed, more maintainable.
12,378,154
Are there any aspects to the C++ programming language where the code is known to be slower than the equivalent C language? Obviously this would be excluding the OO features like virtual functions and vtable features etc. I am wondering whether, when you are programming in a latency-critical area (and you aren't worrie...
2012/09/11
[ "https://Stackoverflow.com/questions/12378154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997112/" ]
Contrary to what many C programmers like to think, one can often write tighter and faster code in C++ all without having to sacrifice a great deal in design. I can't think of anything in C++ that is slower than its counterpart in C. Virtual functions NOT excluded.
If you're using the language that's the intersection of C and C++, then any difference in performance when compiling that code with a C compiler versus a C++ compiler is purely a quality-of-implementation issue; there's no reason one should be faster than the other. Of course in the real world, if you're using C++ you...
12,378,154
Are there any aspects to the C++ programming language where the code is known to be slower than the equivalent C language? Obviously this would be excluding the OO features like virtual functions and vtable features etc. I am wondering whether, when you are programming in a latency-critical area (and you aren't worrie...
2012/09/11
[ "https://Stackoverflow.com/questions/12378154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997112/" ]
Nothing in the C or C++ language standards specifies the speed of any construct (C++ does specify the time complexity of some operations applied to containers, but that's outside the scope of your question). The speed of the code generated for a given construct depends on the compiler used to compile it, and on the sys...
That depends on what you mean by "equivalent". If you compare C's stdio.h with C++'s iostream, stdio.h operations are generally faster (quite a bit faster in some situations). But if you are talking about code written in the subset of C++ that also compiles as valid C, the generated machine code will likely be identica...
12,378,154
Are there any aspects to the C++ programming language where the code is known to be slower than the equivalent C language? Obviously this would be excluding the OO features like virtual functions and vtable features etc. I am wondering whether, when you are programming in a latency-critical area (and you aren't worrie...
2012/09/11
[ "https://Stackoverflow.com/questions/12378154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997112/" ]
Contrary to what many C programmers like to think, one can often write tighter and faster code in C++ all without having to sacrifice a great deal in design. I can't think of anything in C++ that is slower than its counterpart in C. Virtual functions NOT excluded.
Does *Latency critical* mean *as fast as possible* or does it simply mean that *everything has to run in predictable time*? If it is the second case, then the only things that don't run in predictable time are `new`, `delete` and `try/catch`. In embedded programming there are directives to avoid such calls. In other ...
12,378,154
Are there any aspects to the C++ programming language where the code is known to be slower than the equivalent C language? Obviously this would be excluding the OO features like virtual functions and vtable features etc. I am wondering whether, when you are programming in a latency-critical area (and you aren't worrie...
2012/09/11
[ "https://Stackoverflow.com/questions/12378154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997112/" ]
Nothing in the C or C++ language standards specifies the speed of any construct (C++ does specify the time complexity of some operations applied to containers, but that's outside the scope of your question). The speed of the code generated for a given construct depends on the compiler used to compile it, and on the sys...
Does *Latency critical* mean *as fast as possible* or does it simply mean that *everything has to run in predictable time*? If it is the second case, then the only things that don't run in predictable time are `new`, `delete` and `try/catch`. In embedded programming there are directives to avoid such calls. In other ...
12,378,154
Are there any aspects to the C++ programming language where the code is known to be slower than the equivalent C language? Obviously this would be excluding the OO features like virtual functions and vtable features etc. I am wondering whether, when you are programming in a latency-critical area (and you aren't worrie...
2012/09/11
[ "https://Stackoverflow.com/questions/12378154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997112/" ]
Contrary to what many C programmers like to think, one can often write tighter and faster code in C++ all without having to sacrifice a great deal in design. I can't think of anything in C++ that is slower than its counterpart in C. Virtual functions NOT excluded.
There is no code in C++ whose direct equivalent in C is faster- or, indeed, more maintainable.
12,378,154
Are there any aspects to the C++ programming language where the code is known to be slower than the equivalent C language? Obviously this would be excluding the OO features like virtual functions and vtable features etc. I am wondering whether, when you are programming in a latency-critical area (and you aren't worrie...
2012/09/11
[ "https://Stackoverflow.com/questions/12378154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997112/" ]
That depends on what you mean by "equivalent". If you compare C's stdio.h with C++'s iostream, stdio.h operations are generally faster (quite a bit faster in some situations). But if you are talking about code written in the subset of C++ that also compiles as valid C, the generated machine code will likely be identica...
Does *Latency critical* mean *as fast as possible* or does it simply mean that *everything has to run in predictable time*? If it is the second case, then the only things that don't run in predictable time are `new`, `delete` and `try/catch`. In embedded programming there are directives to avoid such calls. In other ...
714,344
Yesterday, I noticed that <https://hkps.pool.sks-keyservers.net/> showed a different page on my laptop than it did on my desktop PC. This URL redirects to one of the many servers listed here: <https://sks-keyservers.net/status/> Unlike a normal URL redirection, the URL does not change, while the contents of the page ...
2014/02/09
[ "https://superuser.com/questions/714344", "https://superuser.com", "https://superuser.com/users/41232/" ]
There are several ways to do this. Here is a very superficial way describe this. One common way is to have "<https://hkps.pool.sks-keyservers.net/>" point to a frontend with a webserver on it. The frontend then proxies your request to one of it's backend servers. There are many ways for the frontend server to ch...
This probably has nothing special to do with the DNS part of the connection. Web servers can key off information your browser sends with it's request headers, e.g., "referer" tags which indicate you clicked on a link on another site to get here, or what's most likely in this case is the User-Agent string sent by your ...
714,344
Yesterday, I noticed that <https://hkps.pool.sks-keyservers.net/> showed a different page on my laptop than it did on my desktop PC. This URL redirects to one of the many servers listed here: <https://sks-keyservers.net/status/> Unlike a normal URL redirection, the URL does not change, while the contents of the page ...
2014/02/09
[ "https://superuser.com/questions/714344", "https://superuser.com", "https://superuser.com/users/41232/" ]
Yes, all the pools of sks-keyservers.net are set up using a DNS round-robin. In terms of reverse proxies, it require all servers to have one enabled, and if you look at the rprox column at <https://sks-keyservers.net/status/> some blue flags are specifying servers with multiple servers in the backend in a clustered set...
There are several ways to do this. Here is a very superficial way describe this. One common way is to have "<https://hkps.pool.sks-keyservers.net/>" point to a frontend with a webserver on it. The frontend then proxies your request to one of it's backend servers. There are many ways for the frontend server to ch...
714,344
Yesterday, I noticed that <https://hkps.pool.sks-keyservers.net/> showed a different page on my laptop than it did on my desktop PC. This URL redirects to one of the many servers listed here: <https://sks-keyservers.net/status/> Unlike a normal URL redirection, the URL does not change, while the contents of the page ...
2014/02/09
[ "https://superuser.com/questions/714344", "https://superuser.com", "https://superuser.com/users/41232/" ]
Yes, all the pools of sks-keyservers.net are set up using a DNS round-robin. In terms of reverse proxies, it require all servers to have one enabled, and if you look at the rprox column at <https://sks-keyservers.net/status/> some blue flags are specifying servers with multiple servers in the backend in a clustered set...
This probably has nothing special to do with the DNS part of the connection. Web servers can key off information your browser sends with it's request headers, e.g., "referer" tags which indicate you clicked on a link on another site to get here, or what's most likely in this case is the User-Agent string sent by your ...
3,632,331
I am working through "Thinking Mathematically" by Mason, Burton and Stacey. One of the questions goes as follows: *Three slices of bread are to be toasted under a grill. The grill can hold two slices at once but only one side is toasted at a time. It takes 30 seconds to toast one side of a piece of bread, 5 seconds to...
2020/04/18
[ "https://math.stackexchange.com/questions/3632331", "https://math.stackexchange.com", "https://math.stackexchange.com/users/698855/" ]
Assuming that (a) flipping a slice does not require removing and replacing it (so that flipping is a total of 3 seconds and not 13 seconds) and (b) messing with one slice does not interrupt the cooking of the other slice, I see no flaw in your solution.
That is smart approach but I see 2 mistakes: 1. You do not add up the 5 seconds to add the Toast 2. You assume that since the "clock" is running once the toast 1 started to grill Toast 2 magically starts to cook at time 10 implying some parallelism there in the actions which does not seem to be justified from the prob...
325,075
I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?
2008/11/28
[ "https://Stackoverflow.com/questions/325075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691/" ]
I did it **with style** (pun indented) ``` <RichTextBox Margin="0,51,0,0" Name="mainTextBox" > <RichTextBox.Resources> <Style TargetType="{x:Type Paragraph}"> <Setter Property="Margin" Value="0"/> </Style> </RichTextBox.Resources> </RichTextBox> ```
Using Line Height ``` RichTextBox rtb = new RichTextBox(); Paragraph p = rtb.Document.Blocks.FirstBlock as Paragraph; p.LineHeight = 10; ```
325,075
I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?
2008/11/28
[ "https://Stackoverflow.com/questions/325075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691/" ]
``` RichTextBox rtb = new RichTextBox(); rtb.SetValue(Paragraph.LineHeightProperty, 1.0); ```
``` <RichTextBox Height="250" Width="500" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" IsReadOnly="True" > <Paragraph> XYZ <LineBreak /> </Paragraph> </RichTextBox> ```
325,075
I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?
2008/11/28
[ "https://Stackoverflow.com/questions/325075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691/" ]
I did it **with style** (pun indented) ``` <RichTextBox Margin="0,51,0,0" Name="mainTextBox" > <RichTextBox.Resources> <Style TargetType="{x:Type Paragraph}"> <Setter Property="Margin" Value="0"/> </Style> </RichTextBox.Resources> </RichTextBox> ```
For me on VS2017 in WPF works this: ``` <RichTextBox HorizontalAlignment="Left" Height="126" Margin="10,280,0,0" VerticalAlignment="Top" Width="343" FontSize="14" Block.LineHeight="2"/> ``` The key is **Block.LineHeight="2"** You can found this also in Properties view but you can't change below 6px from there.
325,075
I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?
2008/11/28
[ "https://Stackoverflow.com/questions/325075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691/" ]
I did it **with style** (pun indented) ``` <RichTextBox Margin="0,51,0,0" Name="mainTextBox" > <RichTextBox.Resources> <Style TargetType="{x:Type Paragraph}"> <Setter Property="Margin" Value="0"/> </Style> </RichTextBox.Resources> </RichTextBox> ```
I know this question was posted before I even started coding but I found that simply setting `ShowSelectedMargin` to `true` did the trick
325,075
I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?
2008/11/28
[ "https://Stackoverflow.com/questions/325075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691/" ]
I did it **with style** (pun indented) ``` <RichTextBox Margin="0,51,0,0" Name="mainTextBox" > <RichTextBox.Resources> <Style TargetType="{x:Type Paragraph}"> <Setter Property="Margin" Value="0"/> </Style> </RichTextBox.Resources> </RichTextBox> ```
``` RichTextBox rtb = new RichTextBox(); rtb.SetValue(Paragraph.LineHeightProperty, 1.0); ```
325,075
I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?
2008/11/28
[ "https://Stackoverflow.com/questions/325075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691/" ]
For me on VS2017 in WPF works this: ``` <RichTextBox HorizontalAlignment="Left" Height="126" Margin="10,280,0,0" VerticalAlignment="Top" Width="343" FontSize="14" Block.LineHeight="2"/> ``` The key is **Block.LineHeight="2"** You can found this also in Properties view but you can't change below 6px from there.
``` <RichTextBox Height="250" Width="500" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" IsReadOnly="True" > <Paragraph> XYZ <LineBreak /> </Paragraph> </RichTextBox> ```
325,075
I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?
2008/11/28
[ "https://Stackoverflow.com/questions/325075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691/" ]
For me on VS2017 in WPF works this: ``` <RichTextBox HorizontalAlignment="Left" Height="126" Margin="10,280,0,0" VerticalAlignment="Top" Width="343" FontSize="14" Block.LineHeight="2"/> ``` The key is **Block.LineHeight="2"** You can found this also in Properties view but you can't change below 6px from there.
``` RichTextBox rtb = new RichTextBox(); rtb.SetValue(Paragraph.LineHeightProperty, 1.0); ```
325,075
I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?
2008/11/28
[ "https://Stackoverflow.com/questions/325075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691/" ]
``` RichTextBox rtb = new RichTextBox(); rtb.SetValue(Paragraph.LineHeightProperty, 1.0); ```
I know this question was posted before I even started coding but I found that simply setting `ShowSelectedMargin` to `true` did the trick
325,075
I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?
2008/11/28
[ "https://Stackoverflow.com/questions/325075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691/" ]
In C# 2008 WAP ``` richtextbox1.SelectionCharOffset = -1 * ( Convert.ToInt32(R223.Txt_Space_Before.Text) * 100); ``` or ``` richtextbox1.SelectionCharOffset = Convert.ToInt32(R223.Txt_Space_Before.Text) * 100; ``` can be used for Line Spacing. This is the only way you can have line height spacing.
I know this question was posted before I even started coding but I found that simply setting `ShowSelectedMargin` to `true` did the trick
325,075
I am using a RichTextBox in WPF, and am trying to set the default paragraph spacing to 0 (so that there is no paragraph spacing). While I could do this in XAML, I would like to achieve it programmatically if possible. Any ideas?
2008/11/28
[ "https://Stackoverflow.com/questions/325075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691/" ]
Using Line Height ``` RichTextBox rtb = new RichTextBox(); Paragraph p = rtb.Document.Blocks.FirstBlock as Paragraph; p.LineHeight = 10; ```
For me on VS2017 in WPF works this: ``` <RichTextBox HorizontalAlignment="Left" Height="126" Margin="10,280,0,0" VerticalAlignment="Top" Width="343" FontSize="14" Block.LineHeight="2"/> ``` The key is **Block.LineHeight="2"** You can found this also in Properties view but you can't change below 6px from there.
5,195
I have just purchased a new CF card for my DSLR. I tested it using Xbench (Mac OS X) and it performs as expected. However, I'd like to do a "surface scan" (moving platter term) to check for "bad sectors" (moving platter term). I could bash script a processes using dd, but I get the feeling that there is a better way ou...
2010/11/27
[ "https://photo.stackexchange.com/questions/5195", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/2363/" ]
As the controller can move the blocks wherever it wants (see wear leveling), the only chance for a whole read/write-test ist to fill the disk up and then compare. Several times with different patterns of course to be sure. And still you won't catch faulty regions, as they are hidden too by the controller as long as he...
In Linux, the command you want is `badblocks`. There appears to be a port of this to Mac OS X as part of [this ext2-for-os-x port](http://sourceforge.net/projects/ext2fsx/) -- install the whole thing and ignore everything but the `/usr/local/sbin/badblocks` command. That said, this will help test, but I don't think it...
5,195
I have just purchased a new CF card for my DSLR. I tested it using Xbench (Mac OS X) and it performs as expected. However, I'd like to do a "surface scan" (moving platter term) to check for "bad sectors" (moving platter term). I could bash script a processes using dd, but I get the feeling that there is a better way ou...
2010/11/27
[ "https://photo.stackexchange.com/questions/5195", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/2363/" ]
As the controller can move the blocks wherever it wants (see wear leveling), the only chance for a whole read/write-test ist to fill the disk up and then compare. Several times with different patterns of course to be sure. And still you won't catch faulty regions, as they are hidden too by the controller as long as he...
I found this on google, I'm not using sd cards for cameras' storage but instead I got my class 10 32 gigs sdhc sandisk completely corrupted after less then 2 years of use on my samsung galaxy S2. I am using badblocks to see where the first badblocks start and then I will make partitions around that area if possible. t...
5,195
I have just purchased a new CF card for my DSLR. I tested it using Xbench (Mac OS X) and it performs as expected. However, I'd like to do a "surface scan" (moving platter term) to check for "bad sectors" (moving platter term). I could bash script a processes using dd, but I get the feeling that there is a better way ou...
2010/11/27
[ "https://photo.stackexchange.com/questions/5195", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/2363/" ]
As the controller can move the blocks wherever it wants (see wear leveling), the only chance for a whole read/write-test ist to fill the disk up and then compare. Several times with different patterns of course to be sure. And still you won't catch faulty regions, as they are hidden too by the controller as long as he...
Reading your comment below the question, I believe [F3](https://github.com/AltraMayor/f3) does exactly what you want. It compiles on Linux/Mac OS X and is also available via Homebrew.
5,195
I have just purchased a new CF card for my DSLR. I tested it using Xbench (Mac OS X) and it performs as expected. However, I'd like to do a "surface scan" (moving platter term) to check for "bad sectors" (moving platter term). I could bash script a processes using dd, but I get the feeling that there is a better way ou...
2010/11/27
[ "https://photo.stackexchange.com/questions/5195", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/2363/" ]
Flash memory does not work the same way as disks with platters. The concept of a "bad sector" does not really exist with flash memory. These days, with flash memory and SSD's, the built-in controller takes care of identifying and marking off unusable blocks of memory, dynamically moving data around to mitigate block wr...
In Linux, the command you want is `badblocks`. There appears to be a port of this to Mac OS X as part of [this ext2-for-os-x port](http://sourceforge.net/projects/ext2fsx/) -- install the whole thing and ignore everything but the `/usr/local/sbin/badblocks` command. That said, this will help test, but I don't think it...
5,195
I have just purchased a new CF card for my DSLR. I tested it using Xbench (Mac OS X) and it performs as expected. However, I'd like to do a "surface scan" (moving platter term) to check for "bad sectors" (moving platter term). I could bash script a processes using dd, but I get the feeling that there is a better way ou...
2010/11/27
[ "https://photo.stackexchange.com/questions/5195", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/2363/" ]
In Linux, the command you want is `badblocks`. There appears to be a port of this to Mac OS X as part of [this ext2-for-os-x port](http://sourceforge.net/projects/ext2fsx/) -- install the whole thing and ignore everything but the `/usr/local/sbin/badblocks` command. That said, this will help test, but I don't think it...
I found this on google, I'm not using sd cards for cameras' storage but instead I got my class 10 32 gigs sdhc sandisk completely corrupted after less then 2 years of use on my samsung galaxy S2. I am using badblocks to see where the first badblocks start and then I will make partitions around that area if possible. t...
5,195
I have just purchased a new CF card for my DSLR. I tested it using Xbench (Mac OS X) and it performs as expected. However, I'd like to do a "surface scan" (moving platter term) to check for "bad sectors" (moving platter term). I could bash script a processes using dd, but I get the feeling that there is a better way ou...
2010/11/27
[ "https://photo.stackexchange.com/questions/5195", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/2363/" ]
In Linux, the command you want is `badblocks`. There appears to be a port of this to Mac OS X as part of [this ext2-for-os-x port](http://sourceforge.net/projects/ext2fsx/) -- install the whole thing and ignore everything but the `/usr/local/sbin/badblocks` command. That said, this will help test, but I don't think it...
Reading your comment below the question, I believe [F3](https://github.com/AltraMayor/f3) does exactly what you want. It compiles on Linux/Mac OS X and is also available via Homebrew.
5,195
I have just purchased a new CF card for my DSLR. I tested it using Xbench (Mac OS X) and it performs as expected. However, I'd like to do a "surface scan" (moving platter term) to check for "bad sectors" (moving platter term). I could bash script a processes using dd, but I get the feeling that there is a better way ou...
2010/11/27
[ "https://photo.stackexchange.com/questions/5195", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/2363/" ]
Flash memory does not work the same way as disks with platters. The concept of a "bad sector" does not really exist with flash memory. These days, with flash memory and SSD's, the built-in controller takes care of identifying and marking off unusable blocks of memory, dynamically moving data around to mitigate block wr...
I found this on google, I'm not using sd cards for cameras' storage but instead I got my class 10 32 gigs sdhc sandisk completely corrupted after less then 2 years of use on my samsung galaxy S2. I am using badblocks to see where the first badblocks start and then I will make partitions around that area if possible. t...
5,195
I have just purchased a new CF card for my DSLR. I tested it using Xbench (Mac OS X) and it performs as expected. However, I'd like to do a "surface scan" (moving platter term) to check for "bad sectors" (moving platter term). I could bash script a processes using dd, but I get the feeling that there is a better way ou...
2010/11/27
[ "https://photo.stackexchange.com/questions/5195", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/2363/" ]
Flash memory does not work the same way as disks with platters. The concept of a "bad sector" does not really exist with flash memory. These days, with flash memory and SSD's, the built-in controller takes care of identifying and marking off unusable blocks of memory, dynamically moving data around to mitigate block wr...
Reading your comment below the question, I believe [F3](https://github.com/AltraMayor/f3) does exactly what you want. It compiles on Linux/Mac OS X and is also available via Homebrew.
5,195
I have just purchased a new CF card for my DSLR. I tested it using Xbench (Mac OS X) and it performs as expected. However, I'd like to do a "surface scan" (moving platter term) to check for "bad sectors" (moving platter term). I could bash script a processes using dd, but I get the feeling that there is a better way ou...
2010/11/27
[ "https://photo.stackexchange.com/questions/5195", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/2363/" ]
Reading your comment below the question, I believe [F3](https://github.com/AltraMayor/f3) does exactly what you want. It compiles on Linux/Mac OS X and is also available via Homebrew.
I found this on google, I'm not using sd cards for cameras' storage but instead I got my class 10 32 gigs sdhc sandisk completely corrupted after less then 2 years of use on my samsung galaxy S2. I am using badblocks to see where the first badblocks start and then I will make partitions around that area if possible. t...
7,802,159
I have the same exact problem that's in this [question](https://stackoverflow.com/questions/5070237/problemas-com-parse-xml-iphone), but it didn't get any good answers. I'm trying to parse an XML file with an `ISO-8859-1` encoding, but everytime there's an accentuated word, it gets truncated and doesn't show properly....
2011/10/18
[ "https://Stackoverflow.com/questions/7802159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000331/" ]
What you want is MySQL [Master-Master replication](http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-replication-multi-master.html), which will work as you request.
You want [MySQL replication](http://dev.mysql.com/doc/refman/5.0/en/replication.html). There are a number of ways to set it up; have a look at that doc.
7,802,159
I have the same exact problem that's in this [question](https://stackoverflow.com/questions/5070237/problemas-com-parse-xml-iphone), but it didn't get any good answers. I'm trying to parse an XML file with an `ISO-8859-1` encoding, but everytime there's an accentuated word, it gets truncated and doesn't show properly....
2011/10/18
[ "https://Stackoverflow.com/questions/7802159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000331/" ]
We did this once with 6 mysql servers doing replication in a circular chain. The replication chain was: ``` A -> B -> C -> D -> E -> F -> A ``` When a failover was detected the master was moved from A to B (an so forth) - DNS was updated for the master - but reads where taken from random member of the chain.
You want [MySQL replication](http://dev.mysql.com/doc/refman/5.0/en/replication.html). There are a number of ways to set it up; have a look at that doc.
7,802,159
I have the same exact problem that's in this [question](https://stackoverflow.com/questions/5070237/problemas-com-parse-xml-iphone), but it didn't get any good answers. I'm trying to parse an XML file with an `ISO-8859-1` encoding, but everytime there's an accentuated word, it gets truncated and doesn't show properly....
2011/10/18
[ "https://Stackoverflow.com/questions/7802159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000331/" ]
* Using MySQL replication. * using active-pasive with [rdbd](http://www.drbd.org/) + [heartbeat](http://linux-ha.org/wiki/Heartbeat) In any case you would need use DNS to automatically update the IP or VIP
You want [MySQL replication](http://dev.mysql.com/doc/refman/5.0/en/replication.html). There are a number of ways to set it up; have a look at that doc.
7,802,159
I have the same exact problem that's in this [question](https://stackoverflow.com/questions/5070237/problemas-com-parse-xml-iphone), but it didn't get any good answers. I'm trying to parse an XML file with an `ISO-8859-1` encoding, but everytime there's an accentuated word, it gets truncated and doesn't show properly....
2011/10/18
[ "https://Stackoverflow.com/questions/7802159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000331/" ]
* Using MySQL replication. * using active-pasive with [rdbd](http://www.drbd.org/) + [heartbeat](http://linux-ha.org/wiki/Heartbeat) In any case you would need use DNS to automatically update the IP or VIP
What you want is MySQL [Master-Master replication](http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-replication-multi-master.html), which will work as you request.
7,802,159
I have the same exact problem that's in this [question](https://stackoverflow.com/questions/5070237/problemas-com-parse-xml-iphone), but it didn't get any good answers. I'm trying to parse an XML file with an `ISO-8859-1` encoding, but everytime there's an accentuated word, it gets truncated and doesn't show properly....
2011/10/18
[ "https://Stackoverflow.com/questions/7802159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000331/" ]
* Using MySQL replication. * using active-pasive with [rdbd](http://www.drbd.org/) + [heartbeat](http://linux-ha.org/wiki/Heartbeat) In any case you would need use DNS to automatically update the IP or VIP
We did this once with 6 mysql servers doing replication in a circular chain. The replication chain was: ``` A -> B -> C -> D -> E -> F -> A ``` When a failover was detected the master was moved from A to B (an so forth) - DNS was updated for the master - but reads where taken from random member of the chain.
6,258,361
I've googled about this all over the Internet and still haven't found a solution. As an ultimate try, I hope someone can give me an exact answer. I get that error when I try to copy a file from a directory to another in an File Explorer I'm trying to do on my own. It has a treeview control to browse for directories an...
2011/06/06
[ "https://Stackoverflow.com/questions/6258361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/786559/" ]
Can you take a look at the [Path.Combine](http://msdn.microsoft.com/en-us/library/fyy7a5kt.aspx) method on MSDN? This will help make sure all your entire path doesn't have extra \'s where they shouldn't be. i.e. `Path.Combine(sourceDir, toBeCopied[i])` If you are still getting an error, let me know what the value if ...
Assuming both `sourceDir` and `targetDir` exist (which you can *and should* check), you might be doubling up a trailing `\`. When building paths, you should use [Path.Combine](http://msdn.microsoft.com/en-us/library/fyy7a5kt.aspx). ``` File.Copy(Path.Combine(sourceDir, toBeCopied[i]), Path.Combine(targetDir, toBeCopie...
6,258,361
I've googled about this all over the Internet and still haven't found a solution. As an ultimate try, I hope someone can give me an exact answer. I get that error when I try to copy a file from a directory to another in an File Explorer I'm trying to do on my own. It has a treeview control to browse for directories an...
2011/06/06
[ "https://Stackoverflow.com/questions/6258361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/786559/" ]
You do not show where `toBeCopied` is created. It looks like you are probably running past the end of the values that are set in the click event, and trying to copy a bunch of files with empty names. You should add this to the beginning of your click event ``` toBeCopied = new string[listView1.SelectedItems.Count]; ...
Assuming both `sourceDir` and `targetDir` exist (which you can *and should* check), you might be doubling up a trailing `\`. When building paths, you should use [Path.Combine](http://msdn.microsoft.com/en-us/library/fyy7a5kt.aspx). ``` File.Copy(Path.Combine(sourceDir, toBeCopied[i]), Path.Combine(targetDir, toBeCopie...
6,258,361
I've googled about this all over the Internet and still haven't found a solution. As an ultimate try, I hope someone can give me an exact answer. I get that error when I try to copy a file from a directory to another in an File Explorer I'm trying to do on my own. It has a treeview control to browse for directories an...
2011/06/06
[ "https://Stackoverflow.com/questions/6258361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/786559/" ]
Does the target path up to the file name exist? `File.Copy()` will not create any missing intermediate path, you would need to do this yourself. Use the debugger to see both the source and target paths you are creating and make sure the source exists and the target exists at least up to the parent of the target file.
Assuming both `sourceDir` and `targetDir` exist (which you can *and should* check), you might be doubling up a trailing `\`. When building paths, you should use [Path.Combine](http://msdn.microsoft.com/en-us/library/fyy7a5kt.aspx). ``` File.Copy(Path.Combine(sourceDir, toBeCopied[i]), Path.Combine(targetDir, toBeCopie...
6,258,361
I've googled about this all over the Internet and still haven't found a solution. As an ultimate try, I hope someone can give me an exact answer. I get that error when I try to copy a file from a directory to another in an File Explorer I'm trying to do on my own. It has a treeview control to browse for directories an...
2011/06/06
[ "https://Stackoverflow.com/questions/6258361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/786559/" ]
Assuming both `sourceDir` and `targetDir` exist (which you can *and should* check), you might be doubling up a trailing `\`. When building paths, you should use [Path.Combine](http://msdn.microsoft.com/en-us/library/fyy7a5kt.aspx). ``` File.Copy(Path.Combine(sourceDir, toBeCopied[i]), Path.Combine(targetDir, toBeCopie...
Borrowing from Henk's loop, but I'd add the file & directory checks, since it is the path not found errors that need checking/creating that the OP has the problem with. ``` for (int i = 0; i < toBeCopied.Length; ++i) { string sourceFile = Path.Combine(sourceDir, toBeCopied[i]); if(File.Exists(sourceFile)) ...
6,258,361
I've googled about this all over the Internet and still haven't found a solution. As an ultimate try, I hope someone can give me an exact answer. I get that error when I try to copy a file from a directory to another in an File Explorer I'm trying to do on my own. It has a treeview control to browse for directories an...
2011/06/06
[ "https://Stackoverflow.com/questions/6258361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/786559/" ]
Can you take a look at the [Path.Combine](http://msdn.microsoft.com/en-us/library/fyy7a5kt.aspx) method on MSDN? This will help make sure all your entire path doesn't have extra \'s where they shouldn't be. i.e. `Path.Combine(sourceDir, toBeCopied[i])` If you are still getting an error, let me know what the value if ...
Does the target path up to the file name exist? `File.Copy()` will not create any missing intermediate path, you would need to do this yourself. Use the debugger to see both the source and target paths you are creating and make sure the source exists and the target exists at least up to the parent of the target file.
6,258,361
I've googled about this all over the Internet and still haven't found a solution. As an ultimate try, I hope someone can give me an exact answer. I get that error when I try to copy a file from a directory to another in an File Explorer I'm trying to do on my own. It has a treeview control to browse for directories an...
2011/06/06
[ "https://Stackoverflow.com/questions/6258361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/786559/" ]
Can you take a look at the [Path.Combine](http://msdn.microsoft.com/en-us/library/fyy7a5kt.aspx) method on MSDN? This will help make sure all your entire path doesn't have extra \'s where they shouldn't be. i.e. `Path.Combine(sourceDir, toBeCopied[i])` If you are still getting an error, let me know what the value if ...
Borrowing from Henk's loop, but I'd add the file & directory checks, since it is the path not found errors that need checking/creating that the OP has the problem with. ``` for (int i = 0; i < toBeCopied.Length; ++i) { string sourceFile = Path.Combine(sourceDir, toBeCopied[i]); if(File.Exists(sourceFile)) ...
6,258,361
I've googled about this all over the Internet and still haven't found a solution. As an ultimate try, I hope someone can give me an exact answer. I get that error when I try to copy a file from a directory to another in an File Explorer I'm trying to do on my own. It has a treeview control to browse for directories an...
2011/06/06
[ "https://Stackoverflow.com/questions/6258361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/786559/" ]
You do not show where `toBeCopied` is created. It looks like you are probably running past the end of the values that are set in the click event, and trying to copy a bunch of files with empty names. You should add this to the beginning of your click event ``` toBeCopied = new string[listView1.SelectedItems.Count]; ...
Does the target path up to the file name exist? `File.Copy()` will not create any missing intermediate path, you would need to do this yourself. Use the debugger to see both the source and target paths you are creating and make sure the source exists and the target exists at least up to the parent of the target file.
6,258,361
I've googled about this all over the Internet and still haven't found a solution. As an ultimate try, I hope someone can give me an exact answer. I get that error when I try to copy a file from a directory to another in an File Explorer I'm trying to do on my own. It has a treeview control to browse for directories an...
2011/06/06
[ "https://Stackoverflow.com/questions/6258361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/786559/" ]
You do not show where `toBeCopied` is created. It looks like you are probably running past the end of the values that are set in the click event, and trying to copy a bunch of files with empty names. You should add this to the beginning of your click event ``` toBeCopied = new string[listView1.SelectedItems.Count]; ...
Borrowing from Henk's loop, but I'd add the file & directory checks, since it is the path not found errors that need checking/creating that the OP has the problem with. ``` for (int i = 0; i < toBeCopied.Length; ++i) { string sourceFile = Path.Combine(sourceDir, toBeCopied[i]); if(File.Exists(sourceFile)) ...
6,258,361
I've googled about this all over the Internet and still haven't found a solution. As an ultimate try, I hope someone can give me an exact answer. I get that error when I try to copy a file from a directory to another in an File Explorer I'm trying to do on my own. It has a treeview control to browse for directories an...
2011/06/06
[ "https://Stackoverflow.com/questions/6258361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/786559/" ]
Does the target path up to the file name exist? `File.Copy()` will not create any missing intermediate path, you would need to do this yourself. Use the debugger to see both the source and target paths you are creating and make sure the source exists and the target exists at least up to the parent of the target file.
Borrowing from Henk's loop, but I'd add the file & directory checks, since it is the path not found errors that need checking/creating that the OP has the problem with. ``` for (int i = 0; i < toBeCopied.Length; ++i) { string sourceFile = Path.Combine(sourceDir, toBeCopied[i]); if(File.Exists(sourceFile)) ...
38,827,783
All of a sudden, my Visual Studio has begun to popup a message every time I want to break my ASP.net project. [!["Debugging is being stopped but is not yet complete" dialog message.](https://i.stack.imgur.com/VEzra.png)](https://i.stack.imgur.com/VEzra.png) How can I get rid of this dialog? There is nothing to compl...
2016/08/08
[ "https://Stackoverflow.com/questions/38827783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1427758/" ]
Deleting all breakpoints **(Menu > Debug > Delete All Breakpoints)** and running in Debug mode fixed it. Unfortunately, nothing else did it for me. I had to again set the breakpoints that I wanted. Alternatively, you can choose to work around this problem by choosing the **Menu > Debug > Terminate All** option instead...
I tried deleting my log files and this fixed the issue for me. I think it stalled while trying to write when the files got so large, somehow. Inside the project folder, try deleting all the log files in `\bin\Debug\logs` (path my vary depending on your own config)
26,374,112
I basically want to create a timer. I have a textview where I need to show a timer like "Updating your location in 2min 29 secs" and I want the timer to decreament For eg 2min 28secs followed by 2min 27 secs. And I want to update it even when the user is not using my app (I dont want it to update in real sense what I...
2014/10/15
[ "https://Stackoverflow.com/questions/26374112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3064175/" ]
The most efficient way in my opinion is using [scheduleAtFixedRate](http://developer.android.com/reference/java/util/Timer.html#scheduleAtFixedRate%28java.util.TimerTask,%20long,%20long%29) when your activity is in foreground and when it is going to background you do not need any services you can just save the current ...
You could use a service and send intents that your activity receives (the one with the TextView) using **LocalBroadcastManager**. You should register a *BroadcastReceiver* inside *Activity.onResume()*, and unregister it inside *onPause()*. Using a **TimerTask** should be the default approach but you must be aware that...
3,694,597
> > Show that, if $P$ and $Q$ are constants and $$y = P\cos(\ln(t)) + Q\sin(\ln(t))$$ > then > $$t^2\frac{d^2y}{dt^2}+t\frac{dy}{dt}+y=0$$ > > >
2020/05/27
[ "https://math.stackexchange.com/questions/3694597", "https://math.stackexchange.com", "https://math.stackexchange.com/users/791189/" ]
Actually this is true only if $n\mid m$. Indeed $$n\cdot\mathbf Z/m\mathbf Z=(n\mathbf Z+m\mathbf Z)/m\mathbf Z=\gcd(m,n)\mathbf Z/m\mathbf Z.$$
$(n)/(m)$ doesn't even make sense unless $(m) \subseteq (n)$, which is equivalent to $n | m$, so I'll assume this. But your statement is false unless $n = 0$ or $m = 0$. If neither is 0, then $(n)/(m) \cong \mathbb Z/(m/n)\mathbb Z$. This is a finite group, as $m/n \neq 0$. However, $(n)$ is infinite as $n \neq 0$ so t...
66,334,998
In Numpy, say I have a matrix A of dimensions i x j x k, and a matrix B of dimensions k x i. How do I get back a product with dimensions k x i without using a loop? For example: ``` Let A = [[[1 2], [3 4]], [[5 6], [7 8]]] B = [[a b], ...
2021/02/23
[ "https://Stackoverflow.com/questions/66334998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11485718/" ]
You can do this by analyzing the input and output dimensions. ``` A.shape -> i, j, k B.shape -> k, i ``` Your example is not very good, but if you look carefully at what you're asking the output to be, the shape of `B` must match the first and last dimensions of `A`. The sum reduction is happening along the last ax...
Looking at your output, `C[:,0]` is ``` A[0] @ B[0].T ``` and similarly, `C[:,1]` is `A[1] @ B[1].T`. With that in mind, the `np.einsum` formula is: ``` C = np.einsum('ijk,ik->ji', A,B) ```
10,070,701
The code below is in C# and I'm using Visual Studio 2010. ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; namespace FrontEnd { class Flow { long i; private int x,y; public int X { get;set; } ...
2012/04/09
[ "https://Stackoverflow.com/questions/10070701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961016/" ]
Constructors don't return a type , just remove the return type which is void in your case. It would run fine then.
As Constructor should be at the starting of the Class , you are facing the above issue . So, you can either change the name or if you want to use it as a constructor just copy the method at the beginning of the class.
10,070,701
The code below is in C# and I'm using Visual Studio 2010. ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; namespace FrontEnd { class Flow { long i; private int x,y; public int X { get;set; } ...
2012/04/09
[ "https://Stackoverflow.com/questions/10070701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961016/" ]
The problem is with the method: ``` private void Flow() { X = x; Y = y; } ``` Your class is named `Flow` so this method can't also be named `Flow`. You will have to change the name of the `Flow` method to something else to make this code compile. Or did you mean to create a private constructor to initialize...
Constructors don't return a type , just remove the return type which is void in your case. It would run fine then.
10,070,701
The code below is in C# and I'm using Visual Studio 2010. ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; namespace FrontEnd { class Flow { long i; private int x,y; public int X { get;set; } ...
2012/04/09
[ "https://Stackoverflow.com/questions/10070701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961016/" ]
The problem is with the method: ``` private void Flow() { X = x; Y = y; } ``` Your class is named `Flow` so this method can't also be named `Flow`. You will have to change the name of the `Flow` method to something else to make this code compile. Or did you mean to create a private constructor to initialize...
just remove this because constructor don't have a return type like void it will be like this : ``` private Flow() { X = x; Y = y; } ```
10,070,701
The code below is in C# and I'm using Visual Studio 2010. ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; namespace FrontEnd { class Flow { long i; private int x,y; public int X { get;set; } ...
2012/04/09
[ "https://Stackoverflow.com/questions/10070701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961016/" ]
The problem is with the method: ``` private void Flow() { X = x; Y = y; } ``` Your class is named `Flow` so this method can't also be named `Flow`. You will have to change the name of the `Flow` method to something else to make this code compile. Or did you mean to create a private constructor to initialize...
A constructor should no have a return type . remove void before each constructor . Some very basic characteristic of a constructor : a. Same name as class b. no return type. c. will be called every time an object is made with the class. for eg- in your program if u made two objects of Flow, Flow flow1=new Flow(); Fl...
10,070,701
The code below is in C# and I'm using Visual Studio 2010. ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; namespace FrontEnd { class Flow { long i; private int x,y; public int X { get;set; } ...
2012/04/09
[ "https://Stackoverflow.com/questions/10070701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961016/" ]
Constructors don't return a type , just remove the return type which is void in your case. It would run fine then.
A constructor should no have a return type . remove void before each constructor . Some very basic characteristic of a constructor : a. Same name as class b. no return type. c. will be called every time an object is made with the class. for eg- in your program if u made two objects of Flow, Flow flow1=new Flow(); Fl...
10,070,701
The code below is in C# and I'm using Visual Studio 2010. ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; namespace FrontEnd { class Flow { long i; private int x,y; public int X { get;set; } ...
2012/04/09
[ "https://Stackoverflow.com/questions/10070701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961016/" ]
The problem is with the method: ``` private void Flow() { X = x; Y = y; } ``` Your class is named `Flow` so this method can't also be named `Flow`. You will have to change the name of the `Flow` method to something else to make this code compile. Or did you mean to create a private constructor to initialize...
As Constructor should be at the starting of the Class , you are facing the above issue . So, you can either change the name or if you want to use it as a constructor just copy the method at the beginning of the class.
10,070,701
The code below is in C# and I'm using Visual Studio 2010. ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; namespace FrontEnd { class Flow { long i; private int x,y; public int X { get;set; } ...
2012/04/09
[ "https://Stackoverflow.com/questions/10070701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961016/" ]
Method names which are same as the class name are called *constructors*. Constructors do not have a return type. So correct as: ``` private Flow() { X = x; Y = y; } ``` Or rename the function as: ``` private void DoFlow() { X = x; Y = y; } ``` Though the whole code does not make any sense to me.
The problem is with the method: ``` private void Flow() { X = x; Y = y; } ``` Your class is named `Flow` so this method can't also be named `Flow`. You will have to change the name of the `Flow` method to something else to make this code compile. Or did you mean to create a private constructor to initialize...
10,070,701
The code below is in C# and I'm using Visual Studio 2010. ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; namespace FrontEnd { class Flow { long i; private int x,y; public int X { get;set; } ...
2012/04/09
[ "https://Stackoverflow.com/questions/10070701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961016/" ]
Constructors don't return a type , just remove the return type which is void in your case. It would run fine then.
just remove this because constructor don't have a return type like void it will be like this : ``` private Flow() { X = x; Y = y; } ```
10,070,701
The code below is in C# and I'm using Visual Studio 2010. ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; namespace FrontEnd { class Flow { long i; private int x,y; public int X { get;set; } ...
2012/04/09
[ "https://Stackoverflow.com/questions/10070701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961016/" ]
Method names which are same as the class name are called *constructors*. Constructors do not have a return type. So correct as: ``` private Flow() { X = x; Y = y; } ``` Or rename the function as: ``` private void DoFlow() { X = x; Y = y; } ``` Though the whole code does not make any sense to me.
A constructor should no have a return type . remove void before each constructor . Some very basic characteristic of a constructor : a. Same name as class b. no return type. c. will be called every time an object is made with the class. for eg- in your program if u made two objects of Flow, Flow flow1=new Flow(); Fl...
10,070,701
The code below is in C# and I'm using Visual Studio 2010. ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; namespace FrontEnd { class Flow { long i; private int x,y; public int X { get;set; } ...
2012/04/09
[ "https://Stackoverflow.com/questions/10070701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961016/" ]
Method names which are same as the class name are called *constructors*. Constructors do not have a return type. So correct as: ``` private Flow() { X = x; Y = y; } ``` Or rename the function as: ``` private void DoFlow() { X = x; Y = y; } ``` Though the whole code does not make any sense to me.
just remove this because constructor don't have a return type like void it will be like this : ``` private Flow() { X = x; Y = y; } ```
88,886
I have a portrait with a blurred background. I'd like to use this to create a mask or for alpha channel or to erase the background. So after editing I want to have an image with perfect white or transparency where was the background and keep the face unchanged. Is it possible? What I tried yet: * made the image cop...
2017/04/23
[ "https://photo.stackexchange.com/questions/88886", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/25684/" ]
A little confused about your question: are you attempting to keep the face and remove the existing background? Are you having difficulty making a decent selection? If the above is correct, you'll want to make a selection of the face.There are a multitude of ways to do that in Photoshop. In this case,you'll want to ma...
As others pointed out, the best way would be to learn: 1. How to use masks 2. Make and enhance selections in Photoshop This is **THE** major first step when learning how to edit an image, beyond the classic and global adjustments, such as contrast, luminosity, curves or B&W conversion. Concerning your image, **Photo...
7,456,993
I have a twist on a common question I've seen in here, and I'm puzzled. What I need is simply a dialog box for each sub item of a list item. I have seen a dialog for a list item, but I need it down to the list item's item. Currently I've tried doing that within the adapter when inside the getView() method. For examp...
2011/09/17
[ "https://Stackoverflow.com/questions/7456993", "https://Stackoverflow.com", "https://Stackoverflow.com/users/703210/" ]
You have to call the `show()` method on your **dia** object.[Link here to the android docs!](http://developer.android.com/reference/android/app/AlertDialog.Builder.html#show%28%29)
Instead of adding a OnClickListener to each item in the list view why don't you add one to the listview itself? ``` myListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id){ // Create and show dialog here } }...
5,670,745
Works fine in firefox but does nothing in ie. ``` <script type="text/javascript"> $(document).ready(function(){ var links = $('.bound'); var west = $('.west'); var west2 = $('.west2'); var west3 = $('.west3'); var west4 = $('.west4'); west2.hide(); west3.hide(); west4.hide(); links....
2011/04/14
[ "https://Stackoverflow.com/questions/5670745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/708908/" ]
Instead of a `click` event on the `option` elements, use a `change` event on the `select` element. ``` var links = $('#lb02'), wests = $('.west,.west2,.west3,.west4'); wests.not('.west').hide(); links.change(function(event) { wests.hide().filter('.' + this.options[this.selectedIndex].id).show(); }); ```
It's probably because IE doesn't recognize `event.target`, it uses a `srcElement` property instead. Also IE may not pass the event parameter to the handler so you have to grab `window.event`. For your click function try: ``` links.click(function(event){ var e = event || window.event, et = (e.target) ? e.ta...
25,912,947
I'm trying to retrieve de int value of this reg dword: SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate I'm able to retrieve a strings' value, but i cant get the int value of the dword... At the end, i would like to have the install date of windows. I searched an found some solutions, but none worked. I'm sta...
2014/09/18
[ "https://Stackoverflow.com/questions/25912947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1663157/" ]
The issue you have is an issue between the 32 bit registry view and the 64 bit registry view as described on MSDN [here](http://msdn.microsoft.com/en-us/library/aa384129.aspx). To solve it you can do the following. Note that the returned value is a Unix timestamp (i.e. the number of seconds from 1 Jan 1970) so you nee...
It isn´t to hard to solve. First of all - skip HKLM if using 64bit. (LocalMachine) Use HKCU (CurrentUser) Use a stringvalue instead of dword for a Installdate. Get stringvalue from registry and then "parse" to DateTime.
11,079,337
I am doing a transform work from windows to wince. For using iostream I choose `STLport5.2.1`. I get the compile error on *vs2008*: > > am files (x86)\windows ce tools\wce500\athenapbws\mfc\include\wcealt.h(248) : error C2084: function 'void \*operator new(size\_t,void \*)' already has a body > > > 2> D:\Program Fi...
2012/06/18
[ "https://Stackoverflow.com/questions/11079337", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1452611/" ]
Put prefer external into your Manifest ``` <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" ... > ```
You can use the installLocation xml tag in Android Manifest file like it writes here: <http://developer.android.com/guide/appendix/install-location.html>
54,645,489
I have a folder named "Models" located at app/models in my laravel project directory. I want to use all models by a single line of code in controller, instead of using each one like: ``` use App/Models/User; use App/Models/Roles; ```
2019/02/12
[ "https://Stackoverflow.com/questions/54645489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8511942/" ]
If i get the question correctly, you need to get the initial text from a tag just before the child tag. A tag’s children are available in a list called [.contents](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#contents-and-children) . You can use `.contents[0]` ``` from bs4 import BeautifulSoup html=""" <spa...
You need to find `<span> .... </span>` with `select` and then get text before it with using `previousSibling` All code : ``` from bs4 import BeautifulSoup html = ''' <span class="t-small summary-count"> Showing 1-25 of 131 ads for <span>"Samsung Galaxy A5"</span>.</span> ''' soup = BeautifulSoup(html, 'lxml') get_s...
19,444,188
I want to save `numpy.array` data into XML file, then read it again. following is my code: **array to string** ``` arr=numpy.zeros((20)) s = str(arr) ``` But This way would generate **enter key and '[',']'** characters in the string. **string to array** I should remove the enter key and '[',']' first. And th...
2013/10/18
[ "https://Stackoverflow.com/questions/19444188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/936332/" ]
You are mixing two different ways of doing "to string": ``` a = numpy.zeros((20)) ``` you can, after stripping newlines and `[]` from it, put `str(a)` in a new `numpy.matrix()` constructor and initialize `numpy.array()` with the returned value: ``` b = numpy.array(numpy.matrix(" ".join(str(a).split()).strip('[]')))...
You can easily turn numpy arrays into regular python lists and vice versa. You could then store the string representation of the list to file, load it from file, turn it back into a list and into a numpy array. ``` >>> list(numpy.zeros(4)) [0.0, 0.0, 0.0, 0.0] >>> numpy.array([0.0, 0.0, 0.0, 0.0]) array([ 0., 0., 0....
19,444,188
I want to save `numpy.array` data into XML file, then read it again. following is my code: **array to string** ``` arr=numpy.zeros((20)) s = str(arr) ``` But This way would generate **enter key and '[',']'** characters in the string. **string to array** I should remove the enter key and '[',']' first. And th...
2013/10/18
[ "https://Stackoverflow.com/questions/19444188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/936332/" ]
You can easily turn numpy arrays into regular python lists and vice versa. You could then store the string representation of the list to file, load it from file, turn it back into a list and into a numpy array. ``` >>> list(numpy.zeros(4)) [0.0, 0.0, 0.0, 0.0] >>> numpy.array([0.0, 0.0, 0.0, 0.0]) array([ 0., 0., 0....
In addition to dumping the ndarray to a .npy file using [save and load](http://docs.scipy.org/doc/numpy/reference/routines.io.html) and noting the details of that file in your xml, you could create a string with the data as noted by Nils Werner. Note: you might want to check out [HDF](http://www.h5py.org/) or [pytable...
19,444,188
I want to save `numpy.array` data into XML file, then read it again. following is my code: **array to string** ``` arr=numpy.zeros((20)) s = str(arr) ``` But This way would generate **enter key and '[',']'** characters in the string. **string to array** I should remove the enter key and '[',']' first. And th...
2013/10/18
[ "https://Stackoverflow.com/questions/19444188", "https://Stackoverflow.com", "https://Stackoverflow.com/users/936332/" ]
You are mixing two different ways of doing "to string": ``` a = numpy.zeros((20)) ``` you can, after stripping newlines and `[]` from it, put `str(a)` in a new `numpy.matrix()` constructor and initialize `numpy.array()` with the returned value: ``` b = numpy.array(numpy.matrix(" ".join(str(a).split()).strip('[]')))...
In addition to dumping the ndarray to a .npy file using [save and load](http://docs.scipy.org/doc/numpy/reference/routines.io.html) and noting the details of that file in your xml, you could create a string with the data as noted by Nils Werner. Note: you might want to check out [HDF](http://www.h5py.org/) or [pytable...
10,850
I am publishing everything in the broker database and able to fetch entire component value with the help of ComponentPresentation class and ComponentFactory class. I am using ComponentPresentation.getContent(true) method to fetch the entire content. But my requirement is to retrieve some specific field value from one o...
2015/01/20
[ "https://tridion.stackexchange.com/questions/10850", "https://tridion.stackexchange.com", "https://tridion.stackexchange.com/users/1390/" ]
In broker final content (xml or html as per your architecture) is published. individual field values (as key values) are not published, so You can not directly fetch any component value. you have to parse your Xml/Html to get that field value. one of the possible way could be to use metadata, to directly fetch the v...
Somewhere in your solution you need to transform your "naked" content into it's presentation form (usually HTML for web purposes; either directly or via ASP.Net/JSP). With Tridion this is traditionally the responsibility of your page and component templates. Recently another approach has gained momentum which is DD4T...
10,850
I am publishing everything in the broker database and able to fetch entire component value with the help of ComponentPresentation class and ComponentFactory class. I am using ComponentPresentation.getContent(true) method to fetch the entire content. But my requirement is to retrieve some specific field value from one o...
2015/01/20
[ "https://tridion.stackexchange.com/questions/10850", "https://tridion.stackexchange.com", "https://tridion.stackexchange.com/users/1390/" ]
When you publish a ComponentPresentation, Tridion renders the data from the component using the component template. The structure of the component as stored in the content manager is not available to you in the broker, just the rendered output. The solution depends rather on what you are trying to do. If you just nee...
Somewhere in your solution you need to transform your "naked" content into it's presentation form (usually HTML for web purposes; either directly or via ASP.Net/JSP). With Tridion this is traditionally the responsibility of your page and component templates. Recently another approach has gained momentum which is DD4T...
50,161,290
I need assistance in creating a query. I have Client table that has unique client info - identified by their unique ClientID. I also have a Client\_UserDefinedFields table that contains values of custom data for clients. They are linked via the ClientID and there may be many records for a ClientID in this Client\_UserD...
2018/05/03
[ "https://Stackoverflow.com/questions/50161290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1218207/" ]
Finally i manage to come up with the query in linq, dont know how to do it in lambda, but it works fine. ``` var obj = (from emisor in _context.DbSetEmisores where emisor.EmisorCuenta == cuenta select new EmisorDto { Segme...
When using LINQ you can use either Query syntax as shown in the LINQ below (If you are familiar with SQL then this looks more natural). <https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/query-syntax-and-method-syntax-in-linq> The other option is to use Method syntax, and below is a shor...
9,963,367
I am trying to make a thing, but I have hit a problem. I have tried all I know, but I am new to [MySQL](http://en.wikipedia.org/wiki/MySQL), so I have hit a dead end. This code: ``` <?php require('cfg.php'); mysql_connect($server, $user, $pass) or die(mysql_error()); mysql_select_db($database) or die(mysq...
2012/04/01
[ "https://Stackoverflow.com/questions/9963367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1124470/" ]
Strings must be quoted and escaped. ``` $name = (isset($_POST['name'])) ? $_POST['name'] : ''; $name = mysql_real_escape_string($name); $query = "INSERT INTO blah (name, ...) VALUES ('{$name}', ...)"; ``` You're going to want to look into SQL injection by the way. Also, before you get too far down the road, you shou...
I'm assuming that `$name`, `$name1`, etc. are strings? You should be enclosing them in single-quotes. Try: ``` "INSERT INTO `data` (`name`, `name1`, `name2`, `name3`) VALUES ('$name', '$name1', '$name2', '$name3')" ``` Remember also to escape all input **user-provided strings values that can potentially act as SQL i...
9,963,367
I am trying to make a thing, but I have hit a problem. I have tried all I know, but I am new to [MySQL](http://en.wikipedia.org/wiki/MySQL), so I have hit a dead end. This code: ``` <?php require('cfg.php'); mysql_connect($server, $user, $pass) or die(mysql_error()); mysql_select_db($database) or die(mysq...
2012/04/01
[ "https://Stackoverflow.com/questions/9963367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1124470/" ]
You haven't quoted your query. You should quote every field like this ``` INSERT INTO data (name, name1, name2, name3) VALUES('$name', '$name1', '$name2', '$name3' ) ``` As an tribute to TheCommonSense, I am providing a mysqli version using correct prepared statement for data safety ``` $db = new mysqli(...); $stmt...
Strings must be quoted and escaped. ``` $name = (isset($_POST['name'])) ? $_POST['name'] : ''; $name = mysql_real_escape_string($name); $query = "INSERT INTO blah (name, ...) VALUES ('{$name}', ...)"; ``` You're going to want to look into SQL injection by the way. Also, before you get too far down the road, you shou...
9,963,367
I am trying to make a thing, but I have hit a problem. I have tried all I know, but I am new to [MySQL](http://en.wikipedia.org/wiki/MySQL), so I have hit a dead end. This code: ``` <?php require('cfg.php'); mysql_connect($server, $user, $pass) or die(mysql_error()); mysql_select_db($database) or die(mysq...
2012/04/01
[ "https://Stackoverflow.com/questions/9963367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1124470/" ]
Strings must be quoted and escaped. ``` $name = (isset($_POST['name'])) ? $_POST['name'] : ''; $name = mysql_real_escape_string($name); $query = "INSERT INTO blah (name, ...) VALUES ('{$name}', ...)"; ``` You're going to want to look into SQL injection by the way. Also, before you get too far down the road, you shou...
``` mysql_query("INSERT INTO data (name, name1, name2, name3) VALUES('$name', '$name1', '$name2', '$name3') ") or die(mysql_error()); ``` or ``` mysql_query("INSERT INTO data (name, name1, name2, name3) VALUES('".$name."', '".$name1."', '".$name2."', '".$name3."') ") or die(mysql_error()); ``` Try this
9,963,367
I am trying to make a thing, but I have hit a problem. I have tried all I know, but I am new to [MySQL](http://en.wikipedia.org/wiki/MySQL), so I have hit a dead end. This code: ``` <?php require('cfg.php'); mysql_connect($server, $user, $pass) or die(mysql_error()); mysql_select_db($database) or die(mysq...
2012/04/01
[ "https://Stackoverflow.com/questions/9963367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1124470/" ]
You haven't quoted your query. You should quote every field like this ``` INSERT INTO data (name, name1, name2, name3) VALUES('$name', '$name1', '$name2', '$name3' ) ``` As an tribute to TheCommonSense, I am providing a mysqli version using correct prepared statement for data safety ``` $db = new mysqli(...); $stmt...
I'm assuming that `$name`, `$name1`, etc. are strings? You should be enclosing them in single-quotes. Try: ``` "INSERT INTO `data` (`name`, `name1`, `name2`, `name3`) VALUES ('$name', '$name1', '$name2', '$name3')" ``` Remember also to escape all input **user-provided strings values that can potentially act as SQL i...
9,963,367
I am trying to make a thing, but I have hit a problem. I have tried all I know, but I am new to [MySQL](http://en.wikipedia.org/wiki/MySQL), so I have hit a dead end. This code: ``` <?php require('cfg.php'); mysql_connect($server, $user, $pass) or die(mysql_error()); mysql_select_db($database) or die(mysq...
2012/04/01
[ "https://Stackoverflow.com/questions/9963367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1124470/" ]
You haven't quoted your query. You should quote every field like this ``` INSERT INTO data (name, name1, name2, name3) VALUES('$name', '$name1', '$name2', '$name3' ) ``` As an tribute to TheCommonSense, I am providing a mysqli version using correct prepared statement for data safety ``` $db = new mysqli(...); $stmt...
``` mysql_query("INSERT INTO data (name, name1, name2, name3) VALUES('$name', '$name1', '$name2', '$name3') ") or die(mysql_error()); ``` or ``` mysql_query("INSERT INTO data (name, name1, name2, name3) VALUES('".$name."', '".$name1."', '".$name2."', '".$name3."') ") or die(mysql_error()); ``` Try this
17,293,922
I am using a program that pastes what is in the clipboard in a modified format according to what I specify. I would like for it to paste paths (i.e. "C:\folder\My File") without the pair of double quotes. This, which isn't using RegEx works: Find " (I simply enter than in one line) and replace with nothing. I enter n...
2013/06/25
[ "https://Stackoverflow.com/questions/17293922", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2519402/" ]
You didn't say which language you use, here's an example in Javascript: ``` > s = 'say "hello" and replace "C:\\folder\\My File" thanks' "say "hello" and replace "C:\folder\My File" thanks" > s.replace(/"([^"\\]*\\[^"]*)"/g, "$1") "say "hello" and replace C:\folder\My File thanks" ```
This should work in .NET: ``` ^".*?\\.*?"$ ```
20,038,409
First thing I am not an expert in writing VBScripts. I have a requirement of deleting files & folders of remote systems with just 1 click. I was trying to build below VBScript but somehow it’s not working. I request any of your help to correct the same or with a new script that help me to fulfill the requirement. Any ...
2013/11/18
[ "https://Stackoverflow.com/questions/20038409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3002951/" ]
Your first problem is that you have the line order incorrect: ``` Set computerList = objfso.OpenTextFile ("C:\computerList.txt", 1) Dim objFSO Set objFSO = CreateObject("Scripting.FileSystemObject") ``` Should be ``` Dim objFSO Set objFSO = CreateObject("Scripting.FileSystemObject") Set computerList = objfso.OpenTe...
When using a UNC path, you will need to use the folder's remote share name. If you have admin privileges on the remote pc use: ``` Const strPath = "c$\Test" ```
31,751,705
I'm trying to redirect to the previous page after a user logs in. I am using a bootstrap modal for login/register forms but if someone doesn't have JS enabled on their browser and are taken to the '/login' page, I want to make sure they are redirected to the root url. I know current\_page? does not work with POST reque...
2015/07/31
[ "https://Stackoverflow.com/questions/31751705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5057766/" ]
I figured it out. I basically create an order variable, name that variable the animal names, and then use that ordered variable to create the chart rather than the animals themselves. Below is the quick process: Create an order variable ``` data test1; set test; temp=_n_; char_animal=put(temp,3.); run; ``` ...
I don't think you can get it in the dataset order. (Technically, by the way, this is *ascending* order of the value of Animal - while it goes 'down' it is still considered ascending from the point of view of the proc; see how the ASCENDING/DESCENDING option order things.) From my understanding, gplot for HBAR allows (...
6,405,614
In my XAML, I am trying to implement the folowing: ``` <DataTrigger Binding="{Binding Path=Word}" Value="\n"> ``` but this does not work, even though Word is \n. I suspect that \n is not the right way to express newline in XAML, but what would be?
2011/06/19
[ "https://Stackoverflow.com/questions/6405614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/339843/" ]
Yes, setting a distant expiry header and the asset will not be downloaded again until that expiry. > > If you remove the Last-Modified and ETag header, you will totally eliminate If-Modified-Since and If-None-Match requests and their 304 Not Modified Responses, so a file will stay cached without checking for updates ...
From my htaccess ... ``` <IfModule mod_headers.c> Header unset Pragma FileETag None Header unset ETag # cache images/pdf docs for 10 days <FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif|js)$"> Header set Expires "Mon, 31 Dec 2035 12:00:00 gmt" Header unset ETag Header unset Last-Mo...
43,587,165
To get row information of currently selected row we can do this ``` var current = e.sender.dataItem(e.sender.select()); ``` But how to get the same when i click on Edit button? I tried `$("#grid").data("kendoGrid").dataItem($(e.sender).closest("tr"));` it didnt work. **EDIT** I tried ways as suggested on the a...
2017/04/24
[ "https://Stackoverflow.com/questions/43587165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2110531/" ]
You should use `e.container` instead of `e.sender`, like this: ``` $("#grid").data("kendoGrid").dataItem($(e.container).closest("tr")) ``` **Update to make it work with a popup** If you are using a popup editor, then the container will be the popup itself and the above will not work. In that case, you can use the ...
If you use the `edit` function in the grid, you can access the data item attributes which is in edit mode using: ``` var grid = $("#yourGrid").kendoGrid({ dataSource: yourGridDatasource, ... edit: function (e) { var attribute = e.sender.dataItem(e.container).attributeName; ...
43,587,165
To get row information of currently selected row we can do this ``` var current = e.sender.dataItem(e.sender.select()); ``` But how to get the same when i click on Edit button? I tried `$("#grid").data("kendoGrid").dataItem($(e.sender).closest("tr"));` it didnt work. **EDIT** I tried ways as suggested on the a...
2017/04/24
[ "https://Stackoverflow.com/questions/43587165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2110531/" ]
You should use `e.container` instead of `e.sender`, like this: ``` $("#grid").data("kendoGrid").dataItem($(e.container).closest("tr")) ``` **Update to make it work with a popup** If you are using a popup editor, then the container will be the popup itself and the above will not work. In that case, you can use the ...
``` var gridDataById= $("#grid").data("kendoGrid"); //Getting selected row var selectedRow = gridDataById.dataItem(gridDataById.select()); console.log(selectedRow); ```
43,587,165
To get row information of currently selected row we can do this ``` var current = e.sender.dataItem(e.sender.select()); ``` But how to get the same when i click on Edit button? I tried `$("#grid").data("kendoGrid").dataItem($(e.sender).closest("tr"));` it didnt work. **EDIT** I tried ways as suggested on the a...
2017/04/24
[ "https://Stackoverflow.com/questions/43587165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2110531/" ]
If you use the `edit` function in the grid, you can access the data item attributes which is in edit mode using: ``` var grid = $("#yourGrid").kendoGrid({ dataSource: yourGridDatasource, ... edit: function (e) { var attribute = e.sender.dataItem(e.container).attributeName; ...
``` var gridDataById= $("#grid").data("kendoGrid"); //Getting selected row var selectedRow = gridDataById.dataItem(gridDataById.select()); console.log(selectedRow); ```
57,101,872
I fixed a bug recently. In the following code, one of the overloaded function was const and the other one was not. The issue will be fixed by making both functions const. My question is why compiler only complained about it when the parameter was 0. ``` #include <iostream> #include <string> class CppSyntaxA { pu...
2019/07/18
[ "https://Stackoverflow.com/questions/57101872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4005852/" ]
`0` is special in C++. A null pointer has the value of `0` so C++ will allow the conversion of `0` to a pointer type. That means when you call ``` a.f(0); ``` You could be calling `void f(int i = 0) const` with an `int` with the value of `0`, or you could call `void f(const std::string&)` with a `char*` initialized ...
> > My question is why compiler only complained about it when the parameter was 0. > > > Because 0 is not only an integer literal, but it is also a null pointer literal. 1 is not a null pointer literal, so there is no ambiguity. The ambiguity arises from the implicit converting constructor of `std::string` that ...
12,201,541
can anyone give me pointers to a library/way of getting country specific calendars. THis is because I am looking to implement Quartz and would like to use different calendars for different countries. THank you
2012/08/30
[ "https://Stackoverflow.com/questions/12201541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1479589/" ]
I would suggest trying Joda Time <http://joda-time.sourceforge.net/> , which has different Chronologies.
JodaTime is a very good api to manipulate those things. <http://joda-time.sourceforge.net/>
12,201,541
can anyone give me pointers to a library/way of getting country specific calendars. THis is because I am looking to implement Quartz and would like to use different calendars for different countries. THank you
2012/08/30
[ "https://Stackoverflow.com/questions/12201541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1479589/" ]
Have a look at this -> <http://icu-project.org/docs/papers/international_calendars_in_java.html> As Joao suggested, you can use ``` Calendar c = Calendar.getInstance(Locale.FRANCE); ``` You should also look at this [Is there a way to get a timeZone with (only) a country code (valid ISO-3166 code)?](https://stac...
JodaTime is a very good api to manipulate those things. <http://joda-time.sourceforge.net/>
10,456,215
I am trying to use activeX to start a windows form application written in C# from my ASP.net website. When I click a button I would like a new page to open up and activeX on that page would call my windows application. I am using Visual Studio 2010. I have followed this tutorial: <http://dotnetslackers.com/articles/cs...
2012/05/04
[ "https://Stackoverflow.com/questions/10456215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/849509/" ]
*The question to ask yourself is, how long do you need to persist the data?* If you only need to save the data to pass it to the next action you can use **POST** or **GET**, the **GET** would pass through the url and the **POST** would not(*typically*). The example you presented would suggest that you need to per...
Option 1 is better, although in your example this is not a POST (but it could be done with a POST). The problems with option 2 are: * If a user had multiple windows or tabs open at the same time, relating to different events, how would you track which event ID should be used? * If a user bookmarked the add event page...
50,364
I've wandered into some dungeon and encountered some necromancers or bandits. I killed some with sneak attack by bow and some turned hostile and they rush to me and I killed them directly. When I sleep, there are no Dark Brotherhood members approaching me. Why?
2012/02/10
[ "https://gaming.stackexchange.com/questions/50364", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/7993/" ]
According to the [Elder Scrolls wiki](http://www.uesp.net/wiki/Oblivion:A_Knife_in_the_Dark), > > you must murder someone in cold blood. In other words, you must murder an innocent without provocation (note that Bandits and the like do not count as the required murder). Once the deed is done, regardless of who is the...
You have to murder someone who is not by default hostile to you, for example a random townsperson. You will get a message on your screen that you've been "witnessed by unseen forces" and after you go to sleep you will be contacted.
50,364
I've wandered into some dungeon and encountered some necromancers or bandits. I killed some with sneak attack by bow and some turned hostile and they rush to me and I killed them directly. When I sleep, there are no Dark Brotherhood members approaching me. Why?
2012/02/10
[ "https://gaming.stackexchange.com/questions/50364", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/7993/" ]
You have to murder someone who is not by default hostile to you, for example a random townsperson. You will get a message on your screen that you've been "witnessed by unseen forces" and after you go to sleep you will be contacted.
The one you kill must be an innocent. I wanted to do the Brotherhood quest early in the game because it bugs me to be a murderer. So, I killed that drug dealer (sells skooma and poisons at night) who stands outside the north wall of the Imperial City, but even though he had not gone aggro on me, his death did not count...
50,364
I've wandered into some dungeon and encountered some necromancers or bandits. I killed some with sneak attack by bow and some turned hostile and they rush to me and I killed them directly. When I sleep, there are no Dark Brotherhood members approaching me. Why?
2012/02/10
[ "https://gaming.stackexchange.com/questions/50364", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/7993/" ]
According to the [Elder Scrolls wiki](http://www.uesp.net/wiki/Oblivion:A_Knife_in_the_Dark), > > you must murder someone in cold blood. In other words, you must murder an innocent without provocation (note that Bandits and the like do not count as the required murder). Once the deed is done, regardless of who is the...
The one you kill must be an innocent. I wanted to do the Brotherhood quest early in the game because it bugs me to be a murderer. So, I killed that drug dealer (sells skooma and poisons at night) who stands outside the north wall of the Imperial City, but even though he had not gone aggro on me, his death did not count...
3,175,607
Im trying to define an array of arrays as a Constant in one of my classes, the code looks like this: ``` Constant = [[1,2,3,4], [5,6,7,8]] ``` When I load up the class in irb I get: ``` NoMethodError: undefined method `[]' for nil:NilClass ``` I tried using %w and all that did was turn each one into ...
2010/07/04
[ "https://Stackoverflow.com/questions/3175607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/222018/" ]
The code you showed works just fine. You're definitely not getting that error message for that particular line. The error is caused elsewhere. And yes, `%w` creates an array of strings. To create normal arrays use `[]` like you did. Edit now that you've shown the real code: `@config` is `nil` in the scope where you ...
It's a bit strange to use a TitleCase name for a constant. But regardless, it works for me: ``` $ ruby --version ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.7.0] $ irb --version irb 0.9.5(05/04/13) $ irb irb(main):001:0> Constant = [[1,2,3,4],[5,6,7,8]] => [[1, 2, 3, 4], [5, 6, 7, 8]] ``` I also tested it i...
2,417
``` cleos --url http://127.0.0.1:8888 --wallet-url http://127.0.0.1:8899 push action eosio.token create '["eosio", "2000000000.0000 KBS"]' --permission eosio.token@active cleos --url http://127.0.0.1:8888 --wallet-url http://127.0.0.1:8899 push action eosio.token issue '["eosio", "100000000.0000 KBS", ""]' --permissio...
2018/09/21
[ "https://eosio.stackexchange.com/questions/2417", "https://eosio.stackexchange.com", "https://eosio.stackexchange.com/users/2283/" ]
When you build from source, you can specify what the core symbol token will be by adding the flag `-s`: `./eosio_build.sh -s "KBS"` ``` printf "Usage: %s \\n[Build Option -o <Debug|Release|RelWithDebInfo|MinSizeRel>] \\n[CodeCoverage -c] \\n[Doxygen -d] \\n[CoreSymbolName -s <1-7 characters>] \\n[Avoid Compiling -a]\...
It only accept system token for **newaccount action** . It could be "SYS" or "EOS" ... You can check it at eos/contracts/eosiolib/core\_symbol.hpp. And change token name to **KBS**