back soft

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

Insert, Update and Delete Operations in ASP.NET MVC

Vote count: 0 I am new to MVC architecture. What I have read and hear about ASP.NET MVC is that all data from sql tables is loaded in Models (ORM-Object Relational Model). Instead of Select queries, LINQ queries are used to fetch data from models, does not need to goto remote server to fetch data, thus saving time. But what does ASP.NET MVC do in case of Insert, Update and Delete? 1) Does it make temporarily make changes to the model and commit finally to sql table once the application closes down/session expires? 2)Does it hit the remote server directly? Please, enlighten me. asked 48 secs agoAmir Diwan Let's block ads! بخوانید...

ادامه مطلب

How to show vehicle moving direction in Gmap.Net

Vote count: 0 I am using Gmap.net API for a small vehicle tracking project. This project is in windows form c#. I am getting info from device like: Latitude, Longitude, Speed, Heading and some other information as well. The Heading information is in degree (0~359), How i can show that the vehicle is moving in some direction with an arrow sign? asked 1 min agoSaud Bin Tariq Let's block ads! بخوانید...

ادامه مطلب

ASP.NET MVC JsonResult not returning responseText in jQuery.post fail callback function

Vote count: 0 I am using jQuery $.post to post some data to an ActionResult method inside my controller. When an error is thrown in the controller, it should retu the error message within the responseText of the response but it's not working. The callback function fail seems to be triggered. Just not getting the error message retued. Not sure what I am doing wrong? This is jQuery posting data: var postData = ["1","2","3"]; $.post('/MyController/GetSomething', $.param(postData, true)) .done(function (data) { alert('Done!'); }) .fail(function (xhr, textStatus, errorThrown) { alert(xhr.responseText); //xhr.responseText is empty }); }); Controllers public class MyController : BaseController { pu...

ادامه مطلب

Kubernetes + MySQL : Creating custom database and user in a Kubernetes container

Vote count: 0 I am trying to create a Django + MySQL app using Google Container Engine and Kubeetes. Following the docs from official MySQL docker image and Kubeetes docs for creating MySQL container I have created the following replication controller apiVersion: v1 kind: ReplicationController metadata: labels: name: mysql name: mysql spec: replicas: 1 template: metadata: labels: name: mysql spec: containers: - image: mysql:5.6.33 name: mysql env: #Root password is compulsory - name: "MYSQL_ROOT_PASSWORD" value: "root_password" - name: "MYSQL_DATABASE" value: "custom_db" - name: "MYSQL_USER" value: "custom_user" - name: "MYSQL_PASSWORD" value: "custom_password" ports: - name: mysql container...

ادامه مطلب

Adding custom HTTP header to SignalR Hub

Vote count: 0 Is it possible to add a custom HTTP header to SignalR Hub from JS client when the coection starts? My SignalR hub is shared both by my mobile and web client. I can pass a header from the mobile client but I'm not sure if this is possible to do this from the web client. This is what I'm trying to do var name = Context.Request.Headers["useame"]; how do I differentiate between the web and mobile client? asked 1 min agoAhmed Mujtaba Let's block ads! بخوانید...

ادامه مطلب

Javascript - Using promise for post PHP, get undefined result

Vote count: 0 I'm a newbie in JS and have a little to no knowledge about asynchronous program and promise. I have a problem in getting result from post PHP as written in this code: showModalLink = function(d, i) { $('#myModalLabel').text(d.source.name + ' - ' + d.target.name); $('#modalJum').text(d.jumlahlelangsama); var lelang = d.daftarlelangsama.split(", "); var lelangmodal = []; var promises = []; for (var i = 0; i < lelang.length; i++) { querystring = "select pemenang from lelang where id = " + lelang[i]; console.log(querystring); var queryobj = { query: querystring }; promises.push($.post('indikasi3modal.php', queryobj)); } Promise.all(promises).then(function(results) { if (results[i] ...

ادامه مطلب

android.net.wifi.STATE_CHANGE not broadcasting when wifi disabled and WifiManager.EXTRA_WIFI_STATE not available

Vote count: 0 Manifest : Permessions : the receiver is executed when wifi...

ادامه مطلب

Default value to a optional class variable parameter function call in vb.net

Vote count: 0 I am trying to pass a class variable as an optional parameter to a function. But it requires a default value. What could I set the default value for the optional class variable. Private Function SaveFruit(Optional byval tempBanana As BananaClass) asked 25 secs agoGowtama Krishna Let's block ads! بخوانید...

ادامه مطلب

Golang io.Reader usage with net.Pipe

Vote count: 0 The problem I'm trying to solve is using io.Reader and io.Writer in a net application without using bufio and strings as per the examples I've been able to find online. For efficiency I'm trying to avoid the memcopys those imply. I've created a test application using net.Pipe on the play area (https://play.golang.org/p/-7YDs1uEc5). There is a data source and sink which talk through a net.Pipe pair of coections (to model a network coection) and a loopback on the far end to reflect the data right back at us. The program gets as far as the loopback agent reading the sent data, but as far as I can see the write back to the coection locks; it certainly never completes. Additionally ...

ادامه مطلب

Using a field from influxdb as the title / label for a point on a grafana dashboard

Vote count: 0 As the title suggests, I have a Grafana 'graph' that I populate with points from InfluxDB. The elements of the time series have two fields: 'rate' and 'source'. The graph is time on the x-axis of course, and 'rate' on the y-axis. I'd like to see 'source' when I hover over a point. Is this possible with Grafana / Infux?` asked 1 min agohorse hair Let's block ads! بخوانید...

ادامه مطلب

How does the API 24 AccessibilityService.dispatchGesture() method work?

Vote count: 0 With API 24 we got a way to dispatch a gesture to the device, however there is no solid documentation or examples out there yet. I am trying to get it to work but currently the gesture is hitting the "onCancelled" callback every time. Here is my code that calls the method: @TargetApi(24) private void pressLocation(Point position){ GestureDescription.Builder builder = new GestureDescription.Builder(); Path p = new Path(); p.lineTo(position.x, position.y); p.lineTo(position.x+10, position.y+10); builder.addStroke(new GestureDescription.StrokeDescription(p, 10L, 200L)); GestureDescription gesture = builder.build(); boolean isDispatched = dispatchGesture(gesture, new GestureResultC...

ادامه مطلب

ASP.net MVC fire controller event when view load

Vote count: 0 I'm using ASP.net MVC and angular js to create a web. I used angular ng-route to render a View when click a link. A the moment when render the View, i want fire the Controller event in order to bind the data and display it. (Similar with ASP.net web form, when page load then can call the data binding function). I'm new in MVC, hope can get some help. Thank you. asked 45 secs agoinc Let's block ads! بخوانید...

ادامه مطلب

How to check development mode in OctoberCMS?

Vote count: 0 I've got a .env file with this content: APP_ENV=dev in the root of my project which shows that I am in the development mode and therefor my config files will be loaded from config/dev directory instead of config directory. Now I want to add live reload to my html page by including the following script: document.write('') But I only want this to be included if I am in development mode, not in production. How can I do this? asked 25 secs agoMeysam Let's block ads! بخوانید...

ادامه مطلب

check user is inactive show a popup and reset if he clicks on continue button javascript

Vote count: 0 Requirement : If user is inactive then show a popup after 5 minutes. and if selected continue session the timer will reset for this and again check for the same. If user haven't click any continue button then the page will refresh. asked 34 secs agoAnuj Sachan Let's block ads! بخوانید...

ادامه مطلب

Enable asp.net core request validation

Vote count: 0 Am I missing something or asp.net core allows to post script tag in user text fields? In Previous versions of asp.net mvc I needed to allow it by [AllowHtml] attribute. Is there a way how enable validation agains potentially dangerous values? I'm free to submit value like during form post. Model: using System.ComponentModel.DataAotations; namespace Test.Models { public class TestModel { [MaxLength(500)] public string Content { get; set; } } } Controller: using Microsoft.AspNetCore.Mvc; using Test.Models; namespace Test.Controllers { public class HomeController : Controller { public IActionResult Index() { var model = new TestModel { Content = "Test" }; retu View(); } [HttpPost]...

ادامه مطلب

Not able to pass logical answer received from Form to NullBoolean model

Vote count: 0 My model is like class mymodel(models.Model): param1=models.NullBooleanField(blank=False) My form is class MyForm01(forms.Form): LCHOICES=[(True, 'Yes'),(False,'No')] answer=forms.ChoiceField( label='Question', choices=LCHOICES, widget=forms.RadioSelect(), help_text='Help text') I am trying to pass the user choice to a model for saving as below, where id_number is a new number for new object creation. myobj=mymodel.objects.create( id=mymodel.objects.get(id=id_number), param1=form.cleaned_data.['answer'] ) Everything happens, including new object creation but the data passed is always True even when the original answer is negative. If I take a print of answer its coming as False...

ادامه مطلب

Assign the date for system.net email outlook appointment visual basic

Vote count: 0 I am using the following code to send an outlook appointment using system.net.mail The code works perfectly and i am able to receive the appointment. But the problem is i can't figure out how to assign the appointment start date or end date 'Str.AppendLine(String.Format("DTSTART:{0:yyyyMMddTHHmmssZ}", DateTime.Now)) Str.AppendLine(String.Format("DTSTAMP:{0:yyyyMMddTHHmmssZ}", DateTime.UtcNow)) Str.AppendLine(String.Format("DTEND:{0:yyyyMMddTHHmmssZ}", DateTime.Now.AddHours(3))) 1) How do i set the UTC, as if i assign current date now it's always +8. can i just provide a date time without using UTC. 2) And how do i specify the date time in the code. cause right now it use DateTi...

ادامه مطلب

Running EXE from buffer in memory

Vote count: 0 i'm trying to make exe packer 5 extract exe to buffer(in my case: vector) add new section get offset of new EP and run but after call newmain i got 0xC0000005 main.cpp: pastebin #define WIN32_LEAN_AND_MEAN #include #include "main.h" typedef struct _BASE_RELOCATION_ENTRY { WORD Offset : 12; WORD Type : 4; } BASE_RELOCATION_ENTRY; BOOL applyRelocBlock(BASE_RELOCATION_ENTRY* block, size_t entriesNum, DWORD page, PVOID newBase) { PVOID ImageBaseAddress = NtCurrentTeb()->Peb->ImageBaseAddress; BASE_RELOCATION_ENTRY* entry = block; for (int i = 0; i < entriesNum; i++) { DWORD offset = entry->Offset; DWORD type = entry->Type; if (entry == NULL || type == 0 || offset == 0) { //printf("...

ادامه مطلب

How to check if there was conflict in SQLite db Android upon inserting?

Vote count: 0 How to check if there was conflict in SQLite Data Base in Android upon inserting? I am using unique keys on 3 rows (id, isbn, google_id) and I simply always add and ignore conflict. What are the ways to get conflicts upon inserting in entry already exists. Should I query before or I can get like "some kind of trace back" so that I will be able to notify user that entry already exists? SQLiteDatabase db = this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(KEY_TITLE, book.getTitle()); values.put ... long id = db.insertWithOnConflict(TABLE_BOOKS, null, values, SQLiteDatabase.CONFLICT_IGNORE); db.close(); retu (int) id; asked 33 secs agoalphiii Let's...

ادامه مطلب

User can't access user databases in SQL Server

Vote count: 0 I have created new user in SQL Server 2012 on one of my cloud machines. But when I try to access any database other than the system ones, they are not accessible. Showing dialog "The Database XXX is not accessible". How can I access all the tables which are created by other users? OR how can I make user who has all the database object access? edited 9 secs agomarc_s asked 1 min agoRajaram Shelar Let's block ads! بخوانید...

ادامه مطلب