back soft

مطالب مرتبط با «using» در back soft | نویسنده: استخدام کار

Navigate throough WPF combobox using up / down arrow keys from the keyboard

Vote count: 0 Is there a way to navigate through a ComboBox elements when dropped down using arrow keys ? I am searching through items from an SQL server and they are displayed but I want to traverse through them using the keyboard instead of the mouse. I tried something like that but it didn't work : private void StackPanel_PreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Down) { ComboBox = e.Source as ComboBox; if (s != null) { s.MoveFocus(new TraversalRequest( FocusNavigationDirection.Next)); } e.Handled = true; } } Xaml : Code source from : Moving to next control on Enter keypress in WPF Here is the combobox : A minor detail, also is there away to remove the highlight fro...

ادامه مطلب

How to create a list of record to mongoDb using expressJs

Vote count: 0 I want to create a array of object to mongoDb using expressJs (restful API ) . I have a array like this : [ { name: 'java', _id: 578c81ea7d5940501419e819, articles: [] }, { name: 'C#', _id: 578c81ea7d5940501419e81a, articles: [] }, { name: 'C++', _id: 578c81ea7d5940501419e81b, articles: [] }, { name: 'cloud', _id: 578c81ea7d5940501419e81c, articles: [] } ] How can I insert this array to mongoDB by only one function ? thanks for any help . asked just nowTrần Dương Let's block ads! بخوانید...

ادامه مطلب

Using do_shortcode on shortcode in HTML

Vote count: 0 Hello, I'm utilizing a Wordpress plugin that has a built in custom shortcode like so: [shortcode template-type]value[/shortcode]. When I enclose the shortcode in a div, the code executes just fine: do_shortcode('[shortcode template]value[/shortcode]', false); However, when I try to run the shortcode as an HTML attribute, it does not work: do_shortcode('', false); I made sure to take into account these changes to the Shortcode API in 2015, and am still unsure why do_shortcode does not work as described in the "Shortcodes with Filtered Styles" workaround. I am attempting to understand the Regex in the do_shortcode source code, and am checking to see if it includes [shortcodes][/s...

ادامه مطلب

CakePHP 3: belongToMany using the ‘through’ Option & How to save?

Vote count: 0 I have a little problem, I need to create friendships system, using 'through' option, but I can not find in documentation how to save extra data in the joint / pivot table. In Candidates Table (User table) $this->belongsToMany('Users', [ 'foreignKey' => 'requester_id', 'targetForeignKey' => 'recipient_id', 'joinTable' => 'coections', 'through' => 'Coections' ]); In coections table need to save additional data, (status, baed_by, created, modified,..) How to do it? if my association set right? asked 10 secs agoSalines Let's block ads! بخوانید...

ادامه مطلب

Not able to connect to mysql from php using netbeans project

Vote count: 0 I am trying to lea php on my own. Things were OK till i reach DB coection. I am using NetBeans 8.1 and had installed xampp to set up mysql and apache server. But when i try to coect to DB using $dbPassword = "PHPpassword"; $dbUserName = "PHPuser"; $dbServer = "localhost"; $dbName = "PHPFirstDB"; $coection = new mysqli($dbServer, $dbUserName, $dbPassword, $dbName); print_r($coection); Ideally i should be seeing $coection details but I am not able to see anything in the script output window. I have set runas : script(run in command line) Can anyone help me here... asked 1 min agoMANO MANO This entry passed through the Full-Text RSS service - if this is your content and you're rea...

ادامه مطلب

how to read data from json instead of array using ng2-dnd package?

Vote count: 0 Im using ng2-dnd package, simple html5 package to do drag-and-drop on a list to sort it, but I could only figure out how to populate the list from an array and I need it from json, this is my code: import { Component } from '@angular/core'; import { DND_DIRECTIVES } from 'ng2-dnd/ng2-dnd'; import { Report } from "./Report"; @Component({ selector: 'my-app', styleUrls: ['style.css'], directives: [DND_DIRECTIVES], template: ` {{title}} list of reports: ID:{{rep.id}} Name:{{rep.name}} {{reports | json}} ` }) export class AppComponent { title = 'Reorder List'; reports = [ new Report(1, 'Italy'), new Report(2, 'Spain'), new Report(3, 'Italy'), new Report(4, 'Spain'), new Report(5, 'N...

ادامه مطلب

plot variation of variable with time using ggplot2 in R

Vote count: 0 I have the following example data: my.list...

ادامه مطلب

Using AngularJS ngModel and Form Validation to $watch two elements and test if they are equal whenever either input changes

Vote count: 0 What I am trying to do is create a directive which compares two password inputs and triggers invalid if either changes. I have found a few examples and have tried a few and have combined a few in my own attempts. However, I have only been able to toggle the validity with $setValidity when the confirm password field changes. When you change the password field it doesn't trigger the invalidity of the comparison. Here's my directive: app.directive("passwordVerify", function() { retu { require: "ngModel", scope: { passwordVerify: '=', }, link: function(scope, element, attrs, ctrl) { scope.$watch(function() { var combined; if (scope.passwordVerify || ctrl.$viewValue) { combined = sc...

ادامه مطلب

Using Owin Self-Host ASP.Net API2 Can't Recieve POST Request with data in body instead of query string

Vote count: 0 I been making a Bot to Receive notification from a Ark: Survival Evolved Game Server and Send them to the Steam account of the player using steam chat system ! well, everything was done greatly with no problem, I tested my work using data sent from a query string, and it works and send the messages etc. but now that i check using the game server, it won't work. The Problem, seems to be coming from sending the HTTP POST Request with body content instead of query string as my app will not receive them. I have made a lot of examples to receive the POST requests but non seems to work, I hope someone here know how to fix this, I lost all hope as i been working on this for over 5 hou...

ادامه مطلب

Converting enum values to int when using NewtonSoft.Json

Vote count: 0 I have an enum: public enum IdleDelayBreakMode { Repeat, ShowNext } I'm using NewtonSoft.Json to convert to json objects containing properties of that enum's type. What's the best solution to serialize values of that enum to arbitrary integers? Ideally i would like to do something like on the snippet below and i want to know if maybe there's a built-in solution for that: public enum IdleDelayBreakMode { [JsonValue(100)] Repeat, // When serializing will be converted to 100 [JsonValue(200)] ShowNext // When serializing will be converted to 200 } asked 13 secs agoMariusz Jamro This entry passed through the Full-Text RSS service - if this is your content and you're reading it on so...

ادامه مطلب

tlbimp.exe generated assembly fails to be registered using regasm.exe

Vote count: 0 I have a native COM dll that I want to build a C# interop assembly for. I'm attempting to do this using tlbimp.exe to generate the c# assembly, and I then regasm.exe to register the assembly for transparent use via COM in another program. I'm delay signing since I'm still in a development environment and wish to do some debugging still. The TlbImp.exe command seems to work fine, the interop file is generated. c:>tlbimp MyNativeComDll.dll /out:MyInteropDll.dll /publickey:myPublicKey.snk /asmversion:1.6.0.0 /delaysign TlbImp : Type library imported to C:MyInteropDll.dll Microsoft .NET Framework Assembly Registration Utility version 4.6.1055.0 for Microsoft .NET Framework version ...

ادامه مطلب

How to pass value Hidden field from database using Entity framework MVC5

Vote count: 0 I am using MVC Entity framework i have generated code i have fields Isactive this fields have values true or false . code looks like controller: [HttpPost] [ValidateAntiForgeryToken] public ActionResult Edit([Bind(Include="ClientId,ClientName,PrimaryContactName,EmailId,PrimaryContact,IsActive,ModifiedBy,ParentCompany")] TP_IntealClients tP_IntealClients) { if (ModelState.IsValid) { db.Entry(tP_IntealClients).State = EntityState.Modified; db.SaveChanges(); retu RedirectToAction("Index"); } retu View(tP_IntealClients); } View: @Html.EditorFor(model => model.IsActive) @Html.ValidationMessageFor(model => model.IsActive, "", new { @class = "text-danger" }) after run the code Isactiv...

ادامه مطلب

How to form a JSON array using 1d array?

Vote count: 0 I am making fixed header table with vertical and horizontal scroll using a github project. I am able to implement the basic template. Incase when I have some hidden table headers, I need to make some changes while passing the data to colModal of the function. I've made those changes. But I am unable to replicate(to match as in first fiddle) the data sent to colModal. HTML Head1 Head2 Head3 Head4 Head5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 Jquery var listWidth = $("#mytable tr th").map(function() { if ($(this).is(":visible")) { retu this.style.width; } }).get(); var viewData = { thsVisible: [] }; for (var i = 0; i < listWidth.length; i++) { var jsonData = { width: li...

ادامه مطلب

Using haxe.macro.TypeTools fails

Vote count: 0 I'm trying to debug a library which uses haxe.macro.TypeTools::findField. I've created a simple code for that: package; using haxe.macro.TypeTools; class Main { public function new() { var test = findField(Child, "hello"); trace(test); } } class Base { private function hello() { } } class Child extends Base { public function new() {} } However I'm getting error Unknown identifier : findField. Is this because it can only be used in build macro context? https://github.com/fponticelli/edge/blob/3b4623172c0ecc426a940cc0c9d34c7e660ce8a2/src/edge/core/macro/BuildSystem.hx#L57 - this is what I'm trying to emulate. Thank you! asked 55 secs agoMisiur This entry passed through the Full-T...

ادامه مطلب

How do I export an Excel worksheet and embed it in email using powershell?

Vote count: 0 I'm looking to take the first worksheet off of an Excel workbook and embed it into the body of an email. The problem I'm ruing into is that the first half of my code won't export the worksheet into a nice, single .htm file (which you can do in Excel) and thus, doesn't embed properly. Another member suggested exporting to a single .mhtml file, but I found that opens another can of worms when trying to get it to embed into the body of an email. I'm willing to tear this all apart and start over, however, if I use a single .htm file from a "Save As" from within Excel, it works perfectly. Thanks in advance all. ##### Excel Stuff Here ################ #Create and get my Excel Obj $ex...

ادامه مطلب

How to set min and max prices for products using _POST_FLAT_FILE_LISTINGS_DATA_ in Amazon MWS API

Vote count: 0 How to set min and max prices for products using _POST_FLAT_FILE_LISTINGS_DATA_ in Amazon MWS API for a particular product with a asin/sku in php asked 16 secs agoSaroj Shaw This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.Recommended article from FiveFilters.org: Most Labour MPs in the UK Are Revolting....

ادامه مطلب

How do I set NTFS permissions to a Linux equivalent using Bash on Windows-10?

Vote count: 0 I want to remote in to a Ubuntu server using my new and still shiny Windows 10 Bash. When I try ssh -i "... /private1.ppk" Uname@IP I get the message " WARNING: UNPROTECTED PRIVATE KEY FILE!" & "Permissions 0444 for '... /private1.ppk' are too open." Wanderings around the web suggest 0600 should do it. I have already stripped back the permissions for the file private1.ppk and the folder it is in to 'read-only' for just one user. Needless to say chmod 0600 private1.ppk doesn't work. I'm not surprised because the Win & Linux ways are so different but it's worth asking in case I'm missing something ... is there a way to get my file to 0600? In the meantime it's back to PuTTY :-) a...

ادامه مطلب

Using Spring RestTemplate for HTTPS call causes "javax.net.ssl.SSLHandshakeException" unable to find valid certification path to requested target

Vote count: 0 I am able to hit the service using postman(rest client) but the same fails while using Spring Rest Template. asked 17 secs agoVikas Rajoria This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.Recommended article from FiveFilters.org: Most Labour MPs in the UK Are Revolting....

ادامه مطلب

Move myvenv and using virtualenvwrapper-win

Vote count: 0 I have this directory structure: C:/Python/projects/ | |__ myproject1name/ | |__project1site/ | |__myvenv/ | |__ myproject2name/ |__project2site/ |__myvenv/ To activate myvenv I digit C:/python/projects/myproject1name/myvenv/scripts/activate It works but it's boring so I want to use virtualenvwrapper-win I installed it inside myvenv (that is with myvenv active)... I think it's an error so I installed again globally. Right? Anyway it doesn't works (workon command unknow). I think I should set WORKON_HOME enviroment variable. I see two ways: 1) use the default %USERPROFILE%Envs 2) set WORKON_HOME=C:/Python/projects/ but then each project should have a different named env? or mayb...

ادامه مطلب

how to get word and decimal value separate in array using regex in c#

Vote count: 0 need following output : 1) decimal value must be as it is 2) if we use "()" in input string as given in variable input1 = "pops + nts(1.75%)" , then its should remove that closing and opening bracket expected output: [0]="pops" 1="nts" [2]="1.75" static void Main(string[] args) { //string input1 = "pops + nts(1.75%)"; string input2 = "pops + nts1.75%"; string[] Resul2 = Regex.Split(input2, @"(W+)(D+)(d+)"); } asked 29 secs agoyash fale This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.Recommended article from FiveFilters.org: Most Labo...

ادامه مطلب