on-internet

Codeigniter command line: The configuration file does not exist

I have a Codeigniter 3.1.7 project locally and the same on my server for environnement testing. In local I can launch commands via: php index.php manage save_existing_documents and it works! But on testing, codeigniter work fine, except with the command line^^ He shows me: The configuration file does not exist Yet the config.php file is in application/config/testing/config.php^^ The folder testing is a symlinks and it works for the rest of the project Thank for your help!

Join the discussion →

How to define relationship between tables in Quill?

When we are working on Slick, we can define the database design with all primary and foreign keys: val id = column[Int]("department_id", O.PrimaryKey, O.AutoInc) def employee = foreignKey("employee_id_fk", id, employeeTableQuery)(_.id) Now I'm working on a Quill project with a MySql database. Normally we use only the simple case class: case class Student(id: Int, name: String, address: Option[String]) How can the database design be defined in Quill?

Join the discussion →

Is it possible to have UB by default?

So, I've been reading the C++ standard and came to [defns.undefined] (3.27 in this C++17 draft that I'm reading. Note that while I'm citing C++17 here, I've found similar wording in other standards)--that is the definition of Undefined Behavior. I noticed this wording (emphasis mine): Note: Undefined behavior may be expected when this International Standard omits any explicit definition of behavior or when a program uses an erroneous construct or erroneous data Now, thinking about this, this sort of makes sense. It's sort of saying that if the Standard doesn't give a behavior for it, it has un

Join the discussion →

PHPMailer no arroja error, siempre dice que se envía el correo

Tengo un php realizado con phpmailer para restablecer la contraseña desde una app, se ejecuta perfectamente cuando se ingresa el correo adecuado, y cuando el correo no existe en la base de datos no lo envía, el problema esta en que siempre muestra el mensaje que se envió correctamente, no arroja ningún error.

Join the discussion →

How to get data with the related table in Slick and Quill without a join?

I'm working with Scala, MySQL, Slick and Quill. Here are my one to many tables (one employee has many assets): Employee Table +-------------+-------+--------+ | employee_id | name | salary | +-------------+-------+--------+ | 1 | A | 50 | | 2 | B | 42 | | 5 | C | 28 | | 8 | D | 61 | +-------------+-------+--------+ Asset Table +----------+----------+-------------+ | asset_id | name | employee_id | +----------+----------+-------------+ | 1 | mouse | 1 | | 2 | keyboard | 1 | | 3 | monitor | 1 | | 5 | keyboard | 2 | | 6 | mouse | 5 | | 8 | mouse | 8 | +----------+----------+-------------+ Here ar

Join the discussion →

NetSuite SuiteTalk API Request limits

Is there any documentations on the request limits of SuiteTalk? Or does anyone know? I want to know if there are any limits on requests made on a per IP, per account, per X amount of time, or other?

Join the discussion →

Using multiple methods to create a simple calculator

I wrote out a simple calculator that uses multiple methods. This is what I wrote out, but is there a better/more efficient way to write this code? Suggestions would be helpful. I want to use multiple methods and have everything visible in the main method. I know it looks silly and can be done in a much more simple way, but I'm trying to explain this to people who are new to C# and are beginning to learn about methods. { Console.WriteLine("Please input two numbers"); int num1 = Convert.ToInt32(Console.ReadLine()); int num2 = Convert.ToInt32(Console.ReadLine()); int answer1 = Sum(num1, num2); in

Join the discussion →

Can I reliably set the subject and body of an email in a form using mailto:?

I'd like to use web form to generate an email using mailto:, with the subject and body specified by the user in the form. Is this supported? The subject and body can be specified in a regular hyperlink, like this: mailto:[email protected]?subject=d e&body=f g I'm testing this with Firefox and Outlook and it works fine: Outlook pre-fills the subject and body with d e and f g, as desired. Of course, those spaces should really be URL-encoded: mailto:[email protected]?subject=d%20e&body=f%20g This works, too: spaces appear in Outlook. (How universal is this? Can I assume it will work for 95% of my users who have their ma

Join the discussion →

Error: El valor no puede ser nulo. Nombre del parametro: String

Estoy desde en una aplicación de Visual Basic 6 tratando de consumir una dll (creada en .net) que realiza una llamada a un servicio. A la hora de consumir esta dll en otro programa de .net NO me surgen errores, y me devuelve los valores. Sin embargo cuando la quiero consumir en visual basic me sale este error: "Error: El valor no puede ser nulo. Nombre del parametro: String" El código de la dll en .net es asi: public class ConsultaClienteCaller { public string BuscarClientePorProducto(ulong CodigoSubsistema, String IdProducto) { String IdPersona = string.Empty; ConsultaCliente.ConsultaCliente

Join the discussion →

React Styled Components - transform scale with props

I am trying to style a navbar and I want a menu to transition open. I am trying to do this by passing a prop to the styled component and then setting the value of transform based on the prop, however I cannot see to figure out the syntax to use a prop in the styled prop. Here's the code: <MenuContainer display={showMobileMenu ? '' : 'none'}> <UL> <LI><A showMobileMenu={showMobileMenu} href="#">Sign in with Github</A></LI> <LI><A showMobileMenu={showMobileMenu} href="#">New Snippet</A></LI> </UL> </MenuContainer> . . . const MenuContainer = styled.nav` position: absolute; text-align: right; top

Join the discussion →

PCA - trace back principal component to a dimension

I have very data with MANY dimensions (thousands) and have successfully performed a principal components analysis on it. The output looks as shown above. My problem is that (as shown on axis X), one principal component accounts for all of the variance. I worry that it is masking all of the other principal components. Therefore, I want to figure out which dimension the principal component corresponds to, and then eliminate it from my data. Is there a way to work out which dimension it corresponds to? If any code is necessary to aid understanding, it is this: print(fdata.shape) # scale data scal

Join the discussion →

Azure Active directory Add Assignment button greyed out

I have an active directory application that is used as a service principle in DevOps pipelines. I need to assign Directory Reader role to this application. I am a Global Administrator, as shown in the picture below. When I try to assign a Directory reader role to the service user, the role assignment button is disabled as shown below. Is Global admin permission is not sufficient for this purpose or am I missing something here?

Join the discussion →

How to format a cell header in xlsx angular

How to format a cell in angular using xlsx or the cellStyles. here's the code. list.component.ts const ws = XLSX.utils.json_to_sheet(reportData); ws['!cols'] = []; Object.keys(reportData[0]).forEach((cell: any) => { const colWidth = cell === 'Date' ? 120 : cell === 'Time' ? 100 : cell === 'Location' ? 200 : cell === 'Temperature' ? 80 : cell === 'Humidity' ? 80 : 100; ws['!cols'].push({ wpx: colWidth }); }); XLSX.utils.book_append_sheet(wb, ws, this.roomTitle); XLSX.writeFile( wb, `${fileName}.xlsx`, { cellStyles: true }, ); what I'm trying to do here is to format it into BOLD TEXT the header

Join the discussion →

How to use only .tar.bz2 packages when installing conda package

In my development environment I am trying to install some packages from an artifactory private repository to my conda environment. I'm trying to explicitly use only the .tar.bz2 file instead of .conda packages as I keep getting a 404 error when trying to pull .conda packages. However, when I'm trying to create an environment, conda is still trying to use .conda packages instead of its .tar.bz2 equivalent. I've tried modifying the .condarc so that I've set use_only_tar_bz2 to true. When I ran conda config --show, it shows that use_only_tar_bz2 flag has been set to true. When I run conda search

Join the discussion →

How to wrap an existing slf4j logger into a kotlin logger?

Given an existing slf4j logger, I would like to wrap it into an kotlin-logging logger. The classes / methods to do that already exists in the library but are internal, so I can't call them: mu.internal.KLoggerFactory.wrapJLogger() Is there another way to do it, which is accessible to users of the library?

Join the discussion →

HTML webpack plugin not injecting script to template

When trying to build the project, two HTML files get created i.e (dist/test.html and dist/src/index.html) dist/test.html /dist/src/index.html?88827167<script type="text/javascript" src="/assets/vendors.chunk.js"></script> <script type="text/javascript" src="/assets/client.js"></script> dist/src/index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="expires" c

Join the discussion →

How to use Quill infix with raw SQL

I wanted to execute raw SQL in a Quill project using MySQL. I referred to the documentation to learn how to do it. The following works: def getProjectsFromSql: Future[List[(Index, String)]] ={ val rawQuery = quote( infix"""SELECT * FROM Project""".as[Query[Project_True]] ) val result = ctx.run(rawQuery) result } But the following results in an error: def getProjectsFromSql: Future[List[(Index, String)]] ={ val rawQuery = quote( infix"""SELECT project_id, name FROM Project""".as[Query[(Int, String)]] ) val result = ctx.run(rawQuery) result } Error: com.github.mauricio.async.db.mysql.exceptions.

Join the discussion →

How do you fix event error 7024 in SQL Server to allow a connection from an application server to a database?

We are having issues connecting our SQL database to an application server. We contacted the application company, and they stated the service "MSSQLSERVER" isn't running, the agent isnt running either but they did not state that needed to be running. We are getting Event Error 7024 saying that data is invalid. The name of the instance is "SQL2012SVR/TWOSOURCE" and we are able to start that service.

Join the discussion →

How to hide video loading spinner in HTML5 video tag?

Problem is on slow 3g connection it continuously shows spinner even when video is loaded and it is playing. Code: <video src="d3cvwyf9ksu0h5.cloudfront.net/answer-1530971608.mp4" preload="auto" autoplay controls controlslist="nodownload" style="width: 100%; height: 100%;"></video>

Join the discussion →

Invoke-command localhost Access Denied

When Trying to invoke-Command against the Local Host I get access denied. I have confirmed that PS remoting is enabled and the account is Administrator. Additionally Remoting in from remote machine works without issue. Invoke-Command -computername LocalHost -scriptblock {hostname} I expect to have the hostname of the local machine returned, however I receive Access denied Errors.

Join the discussion →

How to obtain the types of the key and the value of a std::map using std::iterator_traits?

I am newbee here as well as in template programming. I have a dictionary (means, it could be either std::map or std::vector<std::pair<type1, type2>> or std::set<std::pair<, >> ...) I wanted to write an algorithm, which act like standard library algorithms using the iterators of the passed container. Following is the idea. #include <iostream> #include <algorithm> #include <type_traits> #include <vector> #include <array> #include <map> #include <set> #include <iterator> // two different types enum EnumA { one, two, three, four, five, six}; enum EnumB { one, three, four, six}; // TypeA TypeB usin

Join the discussion →

How to do ConcurrentHashMap.computeIfAbsent without assigning the entry to hashmap?

Is there a way to simulate ConcurrentHashmap.computeIfAbsent but not assign the entry to the hashmap. I just need the instance that the method generated when the entry in the hashmap is not yet there. These are running in Thread. So I need it to be thread-safe. I have tried with sychronized block, but this will hold the entire hash. I want it to be like the computeIfAbsent. synchronized(hashMap) { if (hashMap.contains(key)) { rs = hashMap.get(key); } else { rs = createNewInstance(); } } /* this would be perfect, but I don't what the new instance to be in the hashMap */ rs = hashMap.computeIfAb

Join the discussion →

How to unpack, modify, pack and flash `system.img.ext4` file using Odin?

I have a system.img.ext4.lz4 file that is compatible with my Samsung S10 5G(Qualcomm) device. I have extracted system.img.ext4 file from the system.img.ext4.lz4 using unlz4 system.img.ext4.lz4 command. I want to play with its content. So I have decided it in two steps: Flash system.img.ext4 without modification: Using tar -cvf AP.tar system.img.ext4 command, I have created a AP.tar file. Flashed AP.tar file using Odin3 v3.13. It flashed successfully. Flash system.img.ext4 with modification: a) Modifying With simg2img system.img.ext4 system.img, you will get a raw image file named system.img Wi

Join the discussion →

How to delete archive log files on AWS RDS Oracle instance

We have an AWS Oracle RDS instance that recently ran out of space with ORA-01653 and ORA-01654 (Unable to extend index X by 8 in tablespace X...) errors. On investigation by running query: select nvl(sum(BLOCKS * BLOCK_SIZE),0)/1024/1024/1024 GB from V$ARCHIVED_LOG where DEST_ID=1 and ARCHIVED='YES' and DELETED='NO'; This shows the output: GB ---------- 26.3267608 This leads me to believe we have 26 GB of Archive logs. Running the following query to get some info on the archive files: select * from V$ARCHIVED_LOG where DEST_ID=1 and ARCHIVED='YES' and DELETED='NO'; We have nearly 5000 rows of

Join the discussion →

Table 'wp_users' already exists

Was working on a site offline and suddenly mysql port clash error came then I had to work on it solution for many hours but no luck. So I took the theme files and database manually from xampp and pasted them into a different computer system with a fresh xampp installed on it. This error is coming now which I have shared above. WordPress database error: [Table 'wp_users' already exists] CREATE TABLE wp_users ( ID bigint(20) unsigned NOT NULL auto_increment, user_login varchar(60) NOT NULL default '', user_pass varchar(255) NOT NULL default '', user_nicename varchar(50) NOT NULL default '', user

Join the discussion →

Angular app freezes browser after some time

My angular based app freezes browser after some time. I thought it could possibly happen because of change detection so I set OnPush on the most of top-level components but browser keeps frozen after some time. I checked activity monitor on my mac and it shows me that Google Chrome Helper goes over 100% of CPU after some time and my browser dies. What could be the reason?

Join the discussion →

How to validate powershell conditional syntax?

Is there a syntax checker for conditionals in PowerShell? This code will skip the conditional if ($templList -ne $null -and $templList.items.Length > 0) { $templID=$templList.items[0].id write-host $templList.items } because the '-gt' is substituted with '>'.

Join the discussion →

Active Record in_batches vs find_in_batches

I want to perform batch operations on millions of records from DB. According to the ActiveRecord documentation, there are two methods to perform batch operations, namely #find_in_batches & #in_batches. But, I can't seem to find any difference between them except that one returns an Enumerator and the other an ActiveRecord Relation. So, considering they have different performance, I want to know which performs better in which scenario. And, is there any better way to conditionally update millions of rows except the raw SQL ?

Join the discussion →

PowerShell output lines truncated

When I run a PowerShell cmdlet, often an output line is wider than will fit in the PS window. In this case, the output terminates with ... and the balance of the line is not displayed. Is there any way of seeing this output? I see this specifically in PowerShell V6 on Windows 10. For example, I run the cmdlet Get-ChildItem Env: and several of the lines output by the cmdlet are too long to fit on the screen.

Join the discussion →
Older stories