Categories
Mastering Development User Help

Endless Save Loop in MS Word on Mac

I am currently writing a project report in Microsoft Word but it is not allowing me to save the document. When I cmd-S to save, the save dialog opens, and then re-opens each time I try to save the document. It let me save a pdf version but not any other filetype (.docx, .doc, .rtf […]

Categories
Mastering Development

Post JSON data to elastic search using curl command

I am trying to post Json file to elastic search and facing below errors curl -XPOST http://localhost/test-index/doc -H “Content-Type: application/json” -d @test.json {“error”:{“root_cause”:[{“type”:”illegal_argument_exception”,”reason”:”Rejecting mapping update to [test-index] as the final mapping would have more than 1 type: [_doc, doc]”}],”type”:”illegal_argument_exception”,”reason”:”Rejecting mapping update to [test-index] as the final mapping would have more than 1 type: [_doc, doc]”},”status”:400} […]

Categories
Development

set icon based on file extention. Angular 7

I’m working with Angular 7, and I have a list where I display some document names with an icon. At this momento I’m displaying the same icon no mather what document is, but I have icons for Excel document, pdf, doc, image, etc. I want to know if is there a way to set the […]

Categories
Development

Print to a networked printer from PyQt5

Is there a functionality (widget) in PyQt5 that encapsulates printing to a networked printer? There should be possibility to choose a printer from a dropdown menu and a document (or multiple documents) to print from a filesystem. It should encapsulate the functionality for printing as here or here and it should work on Linux and […]

Categories
Development

need help on how to upload accordingly using php and dropzonejs

this is what I have so far function_upload since I’m uploading multiple files so each file gets looped to the correct format/type of documentand I know I have to add my dropzone.options after this but its not working need help figuring it out: function action_upload($id){ if(!empty($_FILES)) { // $_FILES[‘filename’][‘tmp_name’] foreach($_FILES[‘filename’][‘tmp_name’] as $key => $value) { […]

Categories
CMS Development Magento

how to pass the upload file values to magento 2 uploader?

I have a custom checkout, I have created a custom image up-loader in my checkout file in shipping section. I want to pass the upload file to controller using ajax. <script type=”text/javascript”> function uploadStateIdCopy( ) { var formData = new FormData(); // add assoc key values, this will be posts values formData.append(“file”, jQuery(‘#stateidcopy_file’)[0].files[0]); formData.append(“upload_file”, true); […]

Categories
Development

if i upload more than 60mb file should move folder but not insert why?

$errors = array(); $file_name=$_FILES[“file”][“name”]; $file_size=$_FILES[“file”][“size”]; $temp_name=$_FILES[“file”][“tmp_name”]; $file_type=$_FILES[“file”][“type”]; $target_path=”uploads/”; $file_ext=@end((explode(‘.’,isset($file_name)))); $expensions=array(“jpeg”,”jpg”,”png”,”pdf”,”zip”,”docx”,”txt”,”doc”,”csv”); if(in_array($file_ext,$expensions)=== false) { $errors[]=”Choose Files”; } if($file_size > 2147483648 ) { $errors[]=’File Size should be less than 1GB’; } move_uploaded_file($temp_name,$target_path.$file_name); if($file_name!=”) { $add_query=”INSERT INTO files(file_name,file_status)VALUES(‘$file_name’,’0′)”; $res=mysqli_query($connection,$add_query); } This is my code for file upload. i use 40 mb file to be uploaded but more than […]

Categories
Development

How to invoke Delphi DLL from C#

I have a Delphi function exported from a DLL, and I’m trying to call it from C# without much luck. The Delphi function looks like this: procedure RunMe(text: PWideChar; doc: PWideChar; out resultOne: PWideChar; out resultTwo: PWideChar; out errorText: PWideChar; out warningText: PWideChar); stdcall; In C# I import the function like this: [DllImport(“delphiLibrary.dll”, CallingConvention = […]

Categories
Development

Replace / append HREF filetype extension in Javascript

I must be overthinking this. I need to select all anchor tags with the class name cbs-Line1Link and if it matches the filetype (ppt, pptx, doc, docx, etc.) then add ?Web=1 to the end of the HREF. So, ppt becomes pptx?Web=1 <a class=”cbs-Line1Link” href=”index.pptx”>pptx title</a> ——————————————————– const items = document.querySelectorAll(“.cbs-Line1Link”); items.forEach(item => { let href […]

Categories
Development HTTP Linux PHP Ubuntu

I’m trying to install phpmyadmin, but when I visit http://localhost/phpmyadmin/ it shows this. I’m using debian10 [on hold]

setUserValue( null, ‘FontSize’, $_POST[‘set_fontsize’], ‘82%’ ); header(‘Location: index.php’ . Url::getCommonRaw()); exit(); } // if user selected a theme if (isset($_POST[‘set_theme’])) { $tmanager = ThemeManager::getInstance(); $tmanager->setActiveTheme($_POST[‘set_theme’]); $tmanager->setThemeCookie(); $userPreferences = new UserPreferences(); $prefs = $userPreferences->load(); $prefs[“config_data”][“ThemeDefault”] = $_POST[‘set_theme’]; $userPreferences->save($prefs[“config_data”]); header(‘Location: index.php’ . Url::getCommonRaw()); exit(); } // Change collation connection if (isset($_POST[‘collation_connection’])) { $GLOBALS[‘PMA_Config’]->setUserValue( null, ‘DefaultConnectionCollation’, $_POST[‘collation_connection’], ‘utf8mb4_unicode_ci’ […]