Posts

c# - RethinkDB - When I'm runned GetAll() method throw error -

i'm new start using rethinkdb i'm successed insert process don't give record getall method because i'm runned getall method give me message. the sequence finished. there no more items iterate over. below rethinkdb codes using system.collections.generic; using rethinkdb.driver; using rethinkdb.driver.model; using rethinkdb.driver.net; namespace mhg.projectmanager.service { public class repository<t> { private connection connection; public repository() { connection = rethinkdb.r.connection().db("projectmanager").connect(); } public ilist<t> getlist() { var type = typeof(t); var list = new list<t>(); // throw error line var connections = rethinkdb.r.table(type.name).getall("").run<t>(connection); foreach (t connection in connections) list.add(connection); return l...

javascript - Why when trying to use JQuery on a previously initialized html element variable it returns undefined? -

i read on jquery docs ( https://learn.jquery.com/using-jquery-core/faq/how-do-i-select-elements-when-i-already-have-a-dom-element/ ) use initialized element writing variable name selectors: $(element) but whenever try function call @ press of button returns 'undefined'. this example code did test out in more controlled environment: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="container-fluid"> <div class="row"> <div class="col-md-6"> <button class="btn btn-block btn-primary" onclick="jquery(this)">jquery</button> </div> <div class="col-md-6"> <button class="btn btn-block btn-info" onclick="normaljs(this)">normaljs</button> </div> </div> <div class="row...

android - Get Intent from intent-filter with WebIntent Native Plugin -

i’m working ionic native plugin web intent, , want android intent , use media file or local url in app. androidmanifest.xml it’s ok, , can see myapp option share or pick image. <action android:name="android.intent.action.pick"/> <action android:name="android.intent.action.send"/> <action android:name="android.intent.action.send_multiple"/> <category android:name="android.intent.category.default"/> <data android:mimetype="image/*"/> but i’m locked trying intent in app. i try use [ https://ionicframework.com/docs/native/web-intent/] native plugin, i’m getting response error “plugin_not_installed”. constructor(private _platform: platform, private _webintent: webintent ) { } ... ionviewdidload() { this._platform.ready().then(() => { this._webintent.getintent().then((data: any) => { // use data intent }).catch((error:any) => c...

python - Invalid Directory Name -

i receiving error: file "c:/users/am/pycharmprojects/booyah/first.py", line 5, in main directory = os.chdir(input('enter directory of file want read')) notadirectoryerror: [winerror 267] directory name invalid: 'c:\\users\\am\\desktop\\sad.txt' here code: import os def main(): answer = input('would read, write, create, or quit?') if(answer == 'read'): directory = os.chdir(input('enter directory of file want read')) w = open(directory, 'r') contents = w.read() print(contents) w.close() the directory copy leads text file on desktop. help! it's bit ambiguous want achieve here, here's quick example of how parse read command, chdir directory specified, , print out lines of file. i have hardcoded file name in example: import os answer = input('would read, write, create, or quit?: ') file_name = 'sad.txt' if(answer == 'read'):...

php - SQL - Data not being inserted, no error -

this question has answer here: how mysqli error in different environments? 1 answer reference - error mean in php? 29 answers i have sql table table taking care of members list of website. however, when registering new user, data not inserted in table. no error being shown either check them few times throughout code. if (empty($error_msg)) { // create hashed password using password_hash function. // function salts random salt , can verified // password_verify function. $password = password_hash($password, password_bcrypt); // insert new user database if ($insert_stmt = $mysqli->prepare("insert members (username, email, password) values (?, ?, ?)")) { $insert_stmt->bind_param('sss', $usernam...

Docker swarm stop spin up containers at 250 -

tldr: docker wont spin more 250 containers. i'm deploying cluster of 3 docker services swarm 2 nodes. 2 of services need contain 1 container (have replicas: 1 in docker-compose file), , third service need have 300 containers (have replicas: 300 setting). the problem it's spin 3 services, first 2 1 container each (work should), , third service spin 248 containers out of 300 (i see when docker service ls ). try search if there limit of service or swarm couldn't find any. i appreciate can get. if it's matter, each node 30gb ram , 8 cores, , use 1/3 of ram. i don't think can spin more 250 1 service, due fact of them sitting on same network mean using 250+ ip addresses. unless define custom ipv6 network , try that, you're better off adding network swarm, spin new identical service on swarm on other network tl; dr; define 2 networks , add them service, see if can spin more 250 replicas

C++ code: letters to PGM -

i need write c++ code converts upper case letters pgms. need map upper case letters grid of standard size. e.g. = . . . ..... . . is there library can use provide me co-ordinates each dot needed form letter?