Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I need to make xml file which looks like this:
> <message xmlns="client"
> from="from_user" to="To_user"
> type="chat"><properties
> xmlns="#"http://software""><property><name>assetId</name><value
> type="string">5346879f73322e08db030000</value></property><property><name>status</name><value
> type="string">success</value></property><property><name>long</name><value
> type="double">22.3451</value></property>
> <property><name>lan</name><value type="double">3456</value></property>
> </properties></message>
I don't know how to do it. Could you help me?
Either create it in Notepad or learn XSD and generate it.
Check this
http://www.w3schools.com/xml/default.ASP
and when you are done, learn this:
http://www.w3schools.com/Schema/
you may Create it this way
NSString *str = [NSString stringWithString:#"<message xmlns=\"client\"from=\"from_user\" to=\"To_user\" type=\"chat\"><properties xmlns=\"#\"http://software\"\"><property><name>assetId</name><value type=\"string\">5346879f73322e08db030000</value></property><property><name>status</name><value type=\"string\">success</value></property><property><name>long</name><value type=\"double\">22.3451</value></property> <property><name>lan</name><value type=\"double\">3456</value></property> </properties></message>"];
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am implementing spring security with the existing LDAP where the password are SSHA512 encoded. The deprecated LdapShaEncoder supports only {SHA} and {SSHA}.
Can anyone help me implement a java SSHA512 encoder along with Spring security. Or Are there any libraries which can do the job?
import org.springframework.security.crypto.password.LdapShaPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
#Bean
public PasswordEncoder passwordEncoder() {
return new LdapShaPasswordEncoder();
}
Exception:
java.lang.IllegalArgumentException: Unsupported password prefix '{SSHA512}'
at org.springframework.security.crypto.password.LdapShaPasswordEncoder.matches(LdapShaPasswordEncoder.java:173) ~[spring-security-core-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.security.crypto.password.LdapShaPasswordEncoder.matches(LdapShaPasswordEncoder.java:158) ~[spring-security-core-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.security.authentication.dao.DaoAuthenticationProvider.additionalAuthenticationChecks(DaoAuthenticationProvider.java:90) ~[spring-security-core-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:166) ~[spring-security-core-5.1.3.RELEASE.jar:5.1.3.RELEASE]
Have a look here: https://github.com/lathspell/java_test/tree/master/java_test_openldap
I basically just exchanged the SHA by SHA-512 in MessageDigest.getInstance() and adjusted the prefix and length constants.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I need help...My problem is:
Page source:
<select name="year" id="year" class="form-control select-inline">
<option>1990</option>
<option>1991</option>
<option>1992</option>
<option>1193</option>
</select>
In delphi 7, use:
WebBrowser1.OleObject.Document.All.Item('year', 0).value := '1990';
But form site continue in blank...Help me please
TWebBrowser is just a wrapper for the Internet Explorer ActiveX control, so this is really an IE DOM issue, not a Delphi issue.
Try setting the select element's selectedIndex property instead of its value property:
WebBrowser1.OleObject.Document.All.Item('year', 0).selectedIndex := 0;
The value property is what gets transmitted to the server, but only of there is an item selected to begin with.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I've installed lcurses (luarocks + luajit) but I'm not able to find any tutorial.
I'm reading about ncurses with C language trying to replicate code on lua
but the lua porting is not a C library direct match.
Here are the two "Hello World" example:
lua version
package.path = package.path .. ';/opt/luarocks_pkg/share/lua/5.1/?.lua';
package.cpath = package.cpath.. ';/opt/luarocks_pkg/lib/lua/5.1/?.so';
local curses = require('curses');
local os = require('os');
local function main()
--start curses mode
curses.initscr()
--disable line buffering
curses.raw();
--switch off echoing
curses.echo(false);
--initialize standard screen object
local stdscr = curses.stdscr()
--clear screen
stdscr:clear();
--move cursor at (10,10) and print, here only update the stdscr structure
stdscr:mvaddstr(10,10,'Hello World');
--force curses system to dump the contents on the screen
stdscr:refresh();
--wait for keyb input
stdscr:getch();
--frees the memory taken by curses sub-system and its data structures and puts the terminal in normal mode
curses.endwin();
return(0);
end
main()
C version
#include <ncurses.h>
int main()
{
initscr(); /* Start curses mode */
printw("Hello World !!!"); /* Print Hello World */
refresh(); /* Print it on to the real screen */
getch(); /* Wait for user input */
endwin(); /* End curses mode */
return 0;
}
Replicating C code in lua require a lot of time (to learn how to use lcurses), so I'll appreciate if someone can help me by reporting where I can find a lcurses lua tutorial.
Try lcurses documentation. It indicates that the API is the same so you should be able to get the details from your system's curses or ncurses man doc. If you can't do "man ncurses" or "man curses" (as documented on that link), then you can surely find some online versions:
Same as above, but hyperlinked to actual function docs
Introduction to ncurses
Ncurses howto
ncurses faq
Programmers Guide to ncurses
The intro to ncurses and the howto should provide what you need. Beyond that tou will have to purchase the book. Beyond that you are out of luck, so either way this answer should be closed.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
i have stored procedure sp_1 in server_A .i am calling this SP from Server_B
the code is:exec Server_A.MyDb.dbo.SP_1 in the body of sp i have complicted logic in the final step I insert result to Table_A.
running sp take 10 minute and return 'command complete successfully' but tabe_A is Empty (must be filled).
i try to execute the body of script it work properly .and tble Fill as expect.
i do'nt know what is wrong...?
i try to execute sp_1 from Another server 'server_c' server_d it work fine.
problem is with server_B
i found the anwser the problem is with Remote Query Timeout set to 600 sec
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 months ago.
The community reviewed whether to reopen this question 3 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
How do I store data to be used for all the clients in my server? (like the messages of a chat)
The server that node.js allows you to build, is an application server, which means that state is preserved, between request, on the server side. The following snippet demonstrates this:
var sys = require('sys'),
http = require('http');
var number = 0;
http.createServer(function (req, res) {
console.log(req.method, req.url);
res.writeHead(200, {'Content-Type': 'text/html'});
res.write('<h1>Number is: ' + number + '</h1>');
res.end();
number++;
}).listen(8000);
sys.puts('Server running at http://127.0.0.1:8000/');
node-cache package is currently the best for key value store and it allows synchronous as well as async storage/retrieval/deletion of keys.
npm link
If you want more features have a look at redis-node-client
Or use a native node storage mechanism (written in node.js)
http://github.com/felixge/node-dirty