back soft

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

how can i schedule a job at every 20 seconds using whenever gem in rails

Vote count: 0 I am trying to run a job at every 20 seconds. I am using whenever gem but as per its documentation it allows minimum 1 minute of time. scheduler every 1.minute do ruer "DailyNotificationChecker.send_notifications" end job i thought i can use sleep method and make it sleep for 20 seconds but then it will go to infinite mode and what will happen if my cron will it this method again. class DailyNotificationChecker def self.send_notifications Rails.logger.info "Triggered NotificationChecker" if RUN_SCHEDULER == "true" Rails.logger.info "Ruing Performer" notes = Note.unprocessed if notes.present? notes.each do |note| RealtimeNotificationChecker.performer(note.user_id,"note_created")...

ادامه مطلب

WAP to enter user name and gender to find out is Mr. or Mrs. using condition statement to display hello mr. ___ or hello mrs. ____ [C PROGRAMMING]

Vote count: -4 Title says it all please make sure you submit code in C only =) already tried using name char [30] but cant mix it with else/if condititons. Thank You iC. edited 21 secs agoFUZxxl asked 1 min agoiCastiel Let's block ads! بخوانید...

ادامه مطلب

Html5 Context('2d') when using fill background , drawImage setting the image rectangle on top right

Vote count: 0 i have simple html which draws yellow rectangle on top of it i draw image to draw png image with transparency , the problem is that when i do that , the there is some image rectangle on top right which i don't know from where it come . And here is the code : Test body { background-color: lightblue; } html, body { width: 100%; height: 100%; margin: 0; padding: 0; } div { -webkit-user-select: none; /* webkit (safari, chrome) browsers */ -moz-user-select: none; /* mozilla browsers */ -khtml-user-select: none; /* webkit (konqueror) browsers */ -ms-user-select: none; /* IE10+ */ } #gameAreaWrapper { position: absolute; top: 0; left: 0; opacity: 0; } var cv; var context; var playerIm...

ادامه مطلب

how to create a html form using PHP 7 to send data to a mysql database?

Vote count: 0 Is it really diferent from PHP 5... I have this code that gives me a Parse error: syntax error, unexpected 'New' (T_NEW) in /home/u670931909/public_html/php.php on line 16 PHP code:...

ادامه مطلب

how to add subservices in add to cart using asp.net mvc and jquery

Vote count: 0 var sum = 0; $(".cart-count").data('count', 0); $(document).ready(function () { $(".add_to_cart_button").click(function () { var id = $(this).data("id"); $('#' + id).prop("disabled", "disable"); var vender = $(this).data("vender"); var price = $(this).data("price"); var service = $(this).data("service"); sum = sum + parseInt(price); var div = $('', { id: 'kart_' + id, class: 'kartcontainer', text: service + " : " + price, }); var buttun = $('', { type: 'button', 'data-price': +price, 'data-vend': vender, 'data-ser': service, class: 'removeFromKart', value: 'X', on: { click: function () { sum = sum - parseInt(price); $('#' + id).removeAttr("disabled"); $(this).closest("div").rem...

ادامه مطلب

Getting an tapped row data in to next view controller using accessorybuttontappedforrowwithindexpath

Vote count: 0 Am new ios development,so i have little bit knowledge about this.And my question is,in uitableview selected row data is edit and update using accessorybuttontappedforrowwithindexpath. asked 5 mins agoPreetha Preetha Let's block ads! بخوانید...

ادامه مطلب

How to create 2 different log levels for stdout and file using logback.xml?

Vote count: 0 Below is my logback.xml I have added filter class to set different log levels but it doesn't seem to work. public class APIController { private static final Logger logger = LoggerFactory.getLogger(APIController.class); ... private void handleException(Exception ex, String message) { logger.wa(message); if(logger.isInfoEnabled()){ ex.printstacktrace(); } } } But still I see stacktrace on console. How should I keep 2 different log levels asked 2 mins agouser1298426 Let's block ads! بخوانید...

ادامه مطلب

How to create image file in android from dataURL which is generated using JavaScript

Vote count: 0 How to create image file in android from dataURL which is generated using JavaScript data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT.......== asked 3 mins agosaikumar Let's block ads! بخوانید...

ادامه مطلب

sql server 2012 connection using Uid and Pwd defaulting to Windows Auth

Vote count: 0 I have an Excel workbook that will query a SQL Server 2012 database using VBA. Many users will temporarily use this workbook so I created a generic ID with SQL Server credentials only. Some of the users can execute the VBA and retrieve data without a problem. When other users try, the VBA ignores the provided coection string using the generic user and password and provides their windows credentials. Why are they sending their windows credentials instead of the credentials provided in the coection string? How do I force the coection to use the provided Uid and Pwd? The error message isCoection Failed:SQL State '28000'SQL Server Error 18456...Login failed for user 'DomainUserid' ...

ادامه مطلب

Doctrine won't join two columns- Using Symfony2 and Doctrine

Vote count: 0 I have two tables: Posts id | title | content | user Users id | name and I want to have user name in Posts collection. What am I doing wrong here? Do I have to write custom query to do this? Right now I'm getting user's id in posts collection. class Posts { ... /** * @ORMColumn(name="user", type="text", length=250) * @ORMManyToOne(targetEntity="Users", inversedBy="posts") * @ORMJoinColumn(name="user", referencedColumnName="id") */ protected $user; ... asked 5 mins agoTomasz Szymanek Let's block ads! بخوانید...

ادامه مطلب

Retrive file name from database using HttpHandlers

Vote count: 0 I have database with EmpNo(Int) and EmpImage(Image) columns. I am using HttpHandler to display the Images. I am storing Images both in database and folder. Now I want to change the names of Images in folder as names of EmpNo whose I didn't change while uploading. So need to fetch the Images names from database to compare them with the Image names in the folder and rename them. How can i fetch or extract the image names from the binary data that i get from database using generic handler. I have attached the code In handler for reference. using System; using System.Web; using System.Data; using System.Data.SqlClient; public class Lab_14___ImageFetchingHandler : IHttpHandler { pub...

ادامه مطلب

Add jpegs to kml using coordinates and unique id

Vote count: 1 I need add photos to a kml file however my coordinates do not have time/date fields. So far everything i've found suggests georeferencing jpegs for kml needs to link on time via a gpx file. I have a csv with the following fields: ID, X, Y, photo_id I would think this would be more straight forward than relying on a time stamp however it's proving difficult. Any advice appreciated. asked 1 min agocosi Let's block ads! بخوانید...

ادامه مطلب

How to compile project with clang and the option -std=c++11, using autotools

Vote count: 0 I'm developping a software with C and C++ code. I've recently added some code in c++11 standard. In configure.ac I wrote: for f in '-std=c++11' '-std=c++11 -stdlib=libc++' do AX_CHECK_COMPILE_FLAG([$f], [CXXFLAGS="$CXXFLAGS $f" stdpass=true], [], [], []) ${stdpass-false} && break done if ! "${stdpass-false}"; then AC_MSG_ERROR([Unable to tu on C++11 mode with this compiler]) fi With gcc I've no problem, everything goes well the option -std=c++11 is only applied to g++ and not on gcc. If I try to configure with: CC=clang ./configure I have the following error: checking whether C compiler accepts -std=c++11 -stdlib=libc++... no configure: error: Unable to tu on C++11 mode with th...

ادامه مطلب

How to apply dynamically colNames and colModel in Jqgrid using MVC 4.0

Vote count: 0 I'm working in JqGrid with MVC 4.0 application. How to dynamically set the column names which comes from controller. I want to set the colModel and colnames dynamically. not with static values. kindly me on this. var grid = new JqGridObject() { Page1 = page, PageSize = 500, SortColumn = sidx, SortOrder = sord, Data = GetData("CRM-SALES"), ColumnAry = GetColumn("Input") }; retu Json(grid, JsonRequestBehavior.AllowGet); //json1 = json.toJson(grid); Here is my jqgrid i have tried by myself $.ajax({ type: "POST", url: action, data: {}, // contentType: "application/json;charset=utf-8", dataType: "json", // processData: true, success: function (data, status, xhr) { alert('hi'); var c...

ادامه مطلب

ignore preceding spaces using negative lookbehind

Vote count: 0 I have the following regex (? It works as expected when there is no spaces between Ø and 4, but I am trying to make it work the same way when there are n number of spaces between Ø and 4. so the following shouldn't match Ø4 Ø 4 Ø 4 Ø 4 I tried using s* but I get Lookbehinds need to be zero-width, thus quantifiers are not allowed, whats the way to go? asked 1 min agoBread Let's block ads! بخوانید...

ادامه مطلب

save the session using JSOUP to parse html Android

Vote count: 0 I need to parse and store data from this 2 tables in this link, after using "Inspect element" the network show me the request of tables : Request 1 to get the top table : request1 Request 2 to get the bottom table : request2 What I did: I send a get request to a link I store cookie and user agent I send another request to request1 with cookie and userAgent I send another request to request2 with cookie and userAgent it's not working, even If I try to open those 2 request in my navigator, it's not working, so How I can get data from those tables, and store data in java list ? this what I did : Button Rechercher = (Button) findViewById(R.id.button); Rechercher.setOnClickListener(...

ادامه مطلب

What is the correct way to append Content control to a newly created docx file using c# and openxml

Vote count: 0 This is my code. using (WordprocessingDocument package = WordprocessingDocument.Create(docName, WordprocessingDocumentType.Document)) { MainDocumentPart mainPart = package.AddMainDocumentPart(); mainPart.Document = new Document(); Body body = new Body(); SdtBlock sdtBlock1 = new SdtBlock(); SdtProperties sdtProperties1 = new SdtProperties(); SdtAlias sdtAlias1 = new SdtAlias() { Val = "select" }; Tag tag1 = new Tag() { Val = "select" }; SdtId sdtId1 = new SdtId() { Val = 364947247 }; SdtContentComboBox sdtContentComboBox1 = new SdtContentComboBox(); ListItem listItem1 = new ListItem() { Value = "Choose an item." }; ListItem listItem2 = new ListItem() { DisplayText = "Rama", Val...

ادامه مطلب

OpenGL offscreen rendering and reading the pixel values with a HIDDEN window using glfw

Vote count: 0 I need to render a 3d model into many views and the image size is much larger than screen resolution, so I can not open a so large window and I do not need to open a window to see the rendering result, too. I only want to render the 3d model into many images with different viewpoints. I find this tutorial, http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-14-render-to-texture/, and I try to use glGetTexImage and glReadPixels to read pixel values from fbo. The problem is if the window is not hidden, it is OK. If I set the window hidden using glfwWindowHint(GLFW_VISIBLE, GL_FALSE); I can only read the background color from fbo using glGetTexImage or glReadPixels. And...

ادامه مطلب

how to prepend each letter with a symbol using Regex

Vote count: 0 I have a string time format like this 'd-m-Y H:i', I want to format it like this '%d-%m-%Y %H:%i'. so how do I prepend each letter with % using regex asked 3 mins agouser1883793 Let's block ads! بخوانید...

ادامه مطلب

ASP.NET Core IdentityDbContext using dependency Injection

Vote count: 0 It's any possible to using new dependency injection mechanism in ASP.NET Core to inject IdentityDbContext into my repository? EF version: "EntityFramework.Commands": "7.0.0-rc1-final", "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-final", Context: public class ApplicationDbContext : IdentityDbContext, IApplicationDbContext { public DbSet Customers{ get; set; } protected override void OnModelCreating(ModelBuilder builder) => base.OnModelCreating(builder); } Repository: public class CustomerRepository: ICustomerRepository { private readonly IApplicationDbContext _context; public CustomerRepository(IApplicationDbContext context) { _context = context; } public List GetAll...

ادامه مطلب